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 |
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
# overwrite master with contents of feature branch (feature > master) | |
git checkout feature # source name | |
git merge -s ours master # target name | |
git checkout master # target name | |
git merge feature # source name |