Panda Quests Posted on Apr 21, 2020 What are the most useful git commands you know, that must people don't know? #git #github Top comments (12) Subscribe Personal Trusted User Create template Templates let you quickly answer FAQs or store snippets for re-use. Submit Preview Dismiss Collapse Expand Thomas Lombart Thomas Lombart Thomas Lombart Follow Software Engineer at Raycast Location France Work Front-end developer Joined May 30, 2019 • Apr 21 '20 Dropdown menu Copy link Hide I like to use git status -sb. Basically, it gives you the clean version of git status. Collapse Expand Panda Quests Panda Quests Panda Quests Follow Hi, °(p.q)° I'm pandaquests. I mainly write about software engineering and working in IT. https://pandaquests.medium.com/membership Location Munich/Germany Education M.Sc. Work Software Engineer Joined Sep 19, 2019 • Apr 21 '20 Dropdown menu Copy link Hide Super. Thanks for sharing Collapse Expand Muhammad Iliyas Muhammad Iliyas Muhammad Iliyas Follow DevOps Engineer, Working on AWS resource compliance management from past year! Location Bengaluru Work Senior DevOps Engineer at DataGrokr Analytics Pvt. Ltd. Joined Oct 13, 2019 • Apr 21 '20 Dropdown menu Copy link Hide git log --oneline --graph Collapse Expand Panda Quests Panda Quests Panda Quests Follow Hi, °(p.q)° I'm pandaquests. I mainly write about software engineering and working in IT. https://pandaquests.medium.com/membership Location Munich/Germany Education M.Sc. Work Software Engineer Joined Sep 19, 2019 • Apr 21 '20 Dropdown menu Copy link Hide Thanks for sharing Collapse Expand Pacharapol Withayasakpunt Pacharapol Withayasakpunt Pacharapol Withayasakpunt Follow Currently interested in TypeScript, Vue, Kotlin and Python. Looking forward to learning DevOps, though. Location Thailand Education Yes Joined Oct 30, 2019 • Apr 21 '20 • Edited on Apr 21 • Edited Dropdown menu Copy link Hide I don't know, but I think it depends on whether you are a git master (if you are so good). TIL git rebase -i HEAD~10, and edit it to either split or squash commits. Then git push -f. git config --global core.editor 'nano' is required, if you are bad with vim. If you want to use VSCode, probably 'code -w', I think, I forgot. Collapse Expand Panda Quests Panda Quests Panda Quests Follow Hi, °(p.q)° I'm pandaquests. I mainly write about software engineering and working in IT. https://pandaquests.medium.com/membership Location Munich/Germany Education M.Sc. Work Software Engineer Joined Sep 19, 2019 • Apr 21 '20 Dropdown menu Copy link Hide Love it. Although I know this one already Muhammad Iliyas Muhammad Iliyas Muhammad Iliyas Follow DevOps Engineer, Working on AWS resource compliance management from past year! Location Bengaluru Work Senior DevOps Engineer at DataGrokr Analytics Pvt. Ltd. Joined Oct 13, 2019 • Apr 21 '20 Dropdown menu Copy link Hide Understood, tested it. ☑️ Thanks, Daniel. Muhammad Iliyas Muhammad Iliyas Muhammad Iliyas Follow DevOps Engineer, Working on AWS resource compliance management from past year! Location Bengaluru Work Senior DevOps Engineer at DataGrokr Analytics Pvt. Ltd. Joined Oct 13, 2019 • Apr 22 '20 Dropdown menu Copy link Hide Daniel - You can update the commit message even after it's pushed. You've to push changed commit forcefully. git push origin <branch_name> -f Collapse Expand Panda Quests Panda Quests Panda Quests Follow Hi, °(p.q)° I'm pandaquests. I mainly write about software engineering and working in IT. https://pandaquests.medium.com/membership Location Munich/Germany Education M.Sc. Work Software Engineer Joined Sep 19, 2019 • Apr 21 '20 • Edited on Apr 21 • Edited Dropdown menu Copy link Hide Ah classic. I know that one, too. Don't forget to force push. Thanks for sharing Collapse Expand Muhammad Iliyas Muhammad Iliyas Muhammad Iliyas Follow DevOps Engineer, Working on AWS resource compliance management from past year! Location Bengaluru Work Senior DevOps Engineer at DataGrokr Analytics Pvt. Ltd. Joined Oct 13, 2019 • Apr 21 '20 Dropdown menu Copy link Hide May I please know what exactly the above command does ? Collapse Expand Masiha Ahmadi Masiha Ahmadi Masiha Ahmadi Follow Joined Apr 18, 2020 • Apr 21 '20 • Edited on Apr 21 • Edited Dropdown menu Copy link Hide i like this: git update-index --assume-unchanged filename Collapse Expand Panda Quests Panda Quests Panda Quests Follow Hi, °(p.q)° I'm pandaquests. I mainly write about software engineering and working in IT. https://pandaquests.medium.com/membership Location Munich/Germany Education M.Sc. Work Software Engineer Joined Sep 19, 2019 • Apr 21 '20 Dropdown menu Copy link Hide Awesome. Never used it before. Will try. Thanks for sharing Code of Conduct • Report abuse Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink. Hide child comments as well Confirm For further actions, you may consider blocking this person and/or reporting abuse
Top comments (12)
I like to use
git status -sb
. Basically, it gives you the clean version ofgit status
.Super. Thanks for sharing
git log --oneline --graph
Thanks for sharing
I don't know, but I think it depends on whether you are a git master (if you are so good).
TIL
git rebase -i HEAD~10
, and edit it to either split or squash commits. Thengit push -f
.git config --global core.editor 'nano'
is required, if you are bad with vim. If you want to use VSCode, probably'code -w'
, I think, I forgot.Love it. Although I know this one already
Understood, tested it. ☑️
Thanks, Daniel.
Daniel - You can update the commit message even after it's pushed.
git push origin <branch_name> -f
Ah classic. I know that one, too. Don't forget to force push. Thanks for sharing
May I please know what exactly the above command does ?
i like this:
git update-index --assume-unchanged filename
Awesome. Never used it before. Will try. Thanks for sharing