[GRASS-dev] git: how to avoid bogus merge commits


> st 22. 5. 2019 v 21:44 odesílatel Even Rouault
> <[even.rouault at spatialys.com](https://lists.osgeo.org/mailman/listinfo/grass-dev)> napsal:
> ><i> git fetch origin  (assuming 'origin' point to OSGeo/grass)
> </i>><i> git rebase origin/master
> </i>
> or possibly
> git pull --rebase

git pull --rebase can be indeed used to the same effect. You can even add 
[pull]
    rebase = true

to your .gitconfig.

Nevertheless, IMHV it is still a better idea to use a personal fork + Pull Requests instead of the main repo. With this workflow, even if you do something messy you can always sort it out without adding noise to history

I have updated the section
Keep your local source code up to date
https://trac.osgeo.org/grass/wiki/HowToGit#Keepyourlocalsourcecodeuptodate

The stash step was wrong. I fixed it. In order to reapply the stash you need:

git stash apply && git stash pop

This way the stash is being popped if and only if it has been applied cleanly. If there are conflicts you can reset the repo without losing your stash (which you might want to apply to a different branch etc).

P.