User:Kebap/git commands

From Mudlet
< User:Kebap
Revision as of 13:19, 3 February 2021 by Kebap (talk | contribs) (Git cheat sheet)
Jump to navigation Jump to search
Usual workflow
git pull
git branch myNewFeature
git checkout myNewFeature
work on myNewFile
git status
git add myNewFile
git commit -m "My awesome comment"
git status
rinse and repeat
git push --set-upstream origin myNewFeature
git push
handle the github pull request
git branch -d myNewFeature
Why does "git status" report "Your branch is ahead of 'origin/development' by X commits." and how to remedy?
You probably merged origin/development back into your branch to introduce recent upgrades? Use "git pull --rebase" to flatten them and "git log" to verify
Git cheat sheet
https://www.git-tower.com/blog/git-cheat-sheet