On 2016-11-12 18:39, Vincent Habchi wrote: > I have a private version of the llvm-3.9/Portfile (I just narrowed > down the targets to PowerPC and X86 rather than build everyone of > them which squanders time). But now I can’t git pull —rebase, I get > an error message. > > Of course I have no intention to commit that private patch. How can I > make it ignored by git?
You can stash your changes to hide them from the working directory temporarily: git stash git pull --rebase git stash pop With recent git, the above sequence can be automated: git pull --rebase --autostash This will resolve your immediate problem. For long term changes, I would recommend to put them on separate branches in your local repository. That way you can prepare pushes on master, while keeping everything not ready yet separately. Creating a local branch: git checkout -b vince origin/master Committing changes not ready for upstream: git checkout vince # put all local changes on top of current origin/master git pull --rebase # do stuff git commit ... Submitting changes for upstream: git checkout master git pull --rebase # look for changes you want to submit git log --oneline vince # "copy" these commits to the current branch git cherry-pick <commitish> # verify commits on the branch git log origin/master..master git push origin master Hope that helps. Rainer
