Last active
September 6, 2020 09:46
-
-
Save chriswain/2dc978f2756a221ffa05dbb8750f67bb to your computer and use it in GitHub Desktop.
basic git concepts
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
git add . //the dot adds all the files | |
git add filename // add specific file to commit | |
git status //gives current files modified but not committed | |
git diff filename // so changes to the file since last time file was committed | |
git commit -m “add message about commit here” | |
git push -u origin branch //need to use this for initial commit to that branch | |
git push //if already pushed to branchname | |
git stash // will store current work and push you back to most recent working directory | |
git checkout -b branchname //will create new branch and check you into it | |
git checkout branchname //will check you into already created branch | |
git remote -v //checks your remote repository links | |
git pull origin branchname //pulls down current state of branch need to use this first if have not pulled yet | |
git pull // same as git pull origin branchname after initial pull was done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment