Skip to content

Instantly share code, notes, and snippets.

@RayRedGoose
Last active February 6, 2020 18:54
Show Gist options
  • Save RayRedGoose/fd6e61a929b5f8e0c8854c0b366705b2 to your computer and use it in GitHub Desktop.
Save RayRedGoose/fd6e61a929b5f8e0c8854c0b366705b2 to your computer and use it in GitHub Desktop.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment