Skip to content

Instantly share code, notes, and snippets.

@s10wen
Created January 23, 2014 13:26
Show Gist options
  • Select an option

  • Save s10wen/8578389 to your computer and use it in GitHub Desktop.

Select an option

Save s10wen/8578389 to your computer and use it in GitHub Desktop.
git stash discussion

I'm working on a project that involves theming:

https://github.com/mauricecruz/zero-base-themes/

The main repo has a file that's pointing to 'main-theme'.

I'm working locally on 'my-new-theme'.

In the main repo the file that includes the path to 'main-theme', locally I need to have as 'my-new-theme'.

So I go to pull in the latest changes, but I can't because I need to commit my change.

I don't want to commit this change I only want this locally.

I can't simply ignore the file as the file contains other code in that's required.

This is where I used:

git stash
git pull
git stash pop

Which came in handy. I was able to stash my change, get the latest code, then re add the path change in.

Thoughts?

Full discussion on Twitter: https://twitter.com/s10wen/status/426270829010501632

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