Rewritting Git History Flashcards
1
Q
git commit –amend
A
Replace the last commit with the staged changes and last commit combined. Use with nothing staged to edit the last commit’s message.
2
Q
git rebase
A
Rebase the current branch onto . can be a commit ID, a branch name, a tag, or a relative reference to HEAD.
3
Q
git reflog
A
Show a log of changes to the local repository’s HEAD. Add –relative- date flag to show date info or –all to show all refs.
4
Q
git branch
A
List all of the branches in your repo. Add a argument to create a new branch with the name .
5
Q
git checkout -b
A
Create and check out a new branch named . Drop the -b flag to checkout an existing branch.
6
Q
git merge
A
Merge into the current branch.