How to stage specific lines (not the whole file) using terminal?
git add -e <file-name>Useful git log flags to try:
git log --oneline
git log --all --graph # very useful when checking out a commit to work based on itHow to make an alias for a command?
git config --global alias.lol "log --oneline"How to modify future rebase operations without aborting?
git rebase --edit-todo How to perform interactive rebase starting from the initial commit?
git rebase -i --rootWhat's the difference between squash and fixup in interactive rebase?
Squash preserves all commit messages from the squashed commits, while fixup discards the commit messages of the fixup commits.
How to change a branch name?
git branch -m <new-name>Cherry pick commands to try:
git cherry-pick <commit-id>
--edit # edit the commit message
--no-commit # just take the commit changes without commiting
git cherry-pick c362..e0b7 # (range of commits)Stashing commands to try:
git stash apply # apply last stash without removing it
git stash -m "WIP in issue fixing .."
git stash pop stash@{1} # to pop a specific one