Created
September 12, 2018 07:18
-
-
Save jackofallops/8d3fe332e1f1bda1856947dfd65b6c63 to your computer and use it in GitHub Desktop.
Some command hints for GIT for new starters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Clone a project | |
git clone [URL] | |
# List Branches (all local and remote) | |
git branch -a | |
# List Branches (local copies) | |
git branch -l | |
# Switch branches | |
git checkout [branch-name] | |
# add files/changes to a commit | |
git add [file1] [[file2] [file3] ...] | |
# commit changes with message | |
git commit -m "[your halpful commit message goes here]" | |
# Push changes (existing branch) | |
git push | |
# Create a new branch from the current one | |
git checkout -b [new branch name] | |
# Push new branch (and changes) to remote | |
git push -u [remote name] [remote branch name] | |
# refresh local view updates from remote (doesn't change code, just make local copy aware of changes to the remote) | |
git fetch | |
# Get changes for the current local branch from the remote (if nothing has changed locally) | |
git pull |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment