Difference between revisions of "User:Kebap/git commands"

From Mudlet
Jump to navigation Jump to search
(Created page with "; Usual workflow : git pull : git branch myNewFeature : git checkout myNewFeature : work on myNewFile : git status : git add myNewFile : git commit -m "My awesome comment" : g...")
 
(+2)
Line 10: Line 10:
 
: rinse and repeat
 
: rinse and repeat
 
: git push --set-upstream origin myNewFeature
 
: git push --set-upstream origin myNewFeature
 +
: git push
  
 
; Why does "git status" report "Your branch is ahead of 'origin/development' by X commits." and how to remedy?
 
; Why does "git status" report "Your branch is ahead of 'origin/development' by X commits." and how to remedy?
: You probably pulled origin/development back into your branch to introduce recent upgrades? Use "git pull --rebase" to flatten them.
+
: You probably pulled origin/development back into your branch to introduce recent upgrades? Use "git pull --rebase" to flatten them and "git log" to verify

Revision as of 16:09, 7 January 2021

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
Why does "git status" report "Your branch is ahead of 'origin/development' by X commits." and how to remedy?
You probably pulled origin/development back into your branch to introduce recent upgrades? Use "git pull --rebase" to flatten them and "git log" to verify