Git commands for cherry picking commits, checking the current branch, checking out files from previous commits, cloning repositories with submodules, changing author information and squashing commits. Key commands include git cherry-pick, git log --first-parent, git checkout, git clone --recurse-submodules, git commit --amend, git rebase -i, and git push --force.
Download as TXT, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
50 views
Git Commands
Git commands for cherry picking commits, checking the current branch, checking out files from previous commits, cloning repositories with submodules, changing author information and squashing commits. Key commands include git cherry-pick, git log --first-parent, git checkout, git clone --recurse-submodules, git commit --amend, git rebase -i, and git push --force.
git branch -d 19_00_271_1_70_build -- to delete local branch
How to squash the commit?
===================== 1.git rebase -i HEAD~2 (2 means top 2 commit we want to merge) 2.Then editor will be opened in that first one will be latest commit. For all subsquent commit right squash. 3.Save and close 4.The next file will be opened there Edit the commit message 5.Save and close. 6.Do git push --force.