What is one command that you'll incorporate into your daily workflow and why?
It should be rabase instead of merge. Because It allows to get some commits from base branch to working branch especially if they have been added after working branch was created and they can be important to next changes in working branch.
How does rebasing work compared to a merge workflow?
- When you do rebase a feature branch onto master, you move the base of the feature branch to master branch’s ending point.
- Merging takes the contents of the feature branch and integrates it with the master branch. As a result, only the master branch is changed. The feature branch history remains same.
- Merging adds a new commit to your history.
- Rebase allows to keep clear commits history.
Why would we ever use git stash?
git stash
allows to save local modifications away and revert the working directory to match the HEAD commit.
What is the primary difference between git reset —soft and git reset —hard?
Git reset --hard
will change head, index and working directory.
Git reset --soft
will change head only.