Skip to content

Instantly share code, notes, and snippets.

@Dustin-Mikusko
Created February 6, 2020 18:50
Show Gist options
  • Select an option

  • Save Dustin-Mikusko/d984b2789ae0725f399afec06bf23233 to your computer and use it in GitHub Desktop.

Select an option

Save Dustin-Mikusko/d984b2789ae0725f399afec06bf23233 to your computer and use it in GitHub Desktop.
Git Workflow

What is one command that you'll incorporate into your daily workflow and why?

git rebase- until today, I did not understand the power of rebase. It seems like, in a larger scale, something you'd almost want to do atomically as well. It allows you to make sure your branch can still operate with master.

How does rebasing work compared to a merge workflow?

Rebase, in my mind, does a soft 'pull', which then allows the work on your branch to stay almost up to date with master, to check that it still is compatible, rather than merging into incompatible master.

Why would we ever use git stash?

I actually use git stash all the time. If I've made a change that I no longer wish to keep, or that isn't compatible with the code, and it's not hugely important to keep, I stash it, pull down master, and maybe restart.

What is the primary difference between git reset —soft and git reset —hard?

The difference between them is to change or not change head, stage (index), working directory. Git reset --hard will change head, index and working directory. Git reset --soft will change head only. No change to index, working directory

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