A Simple, but Good Git Tips

Pokémon Auto Chess is a wonderful game. I was very excited when I found out that someone made an open source, community auto battler. For fans, by fans. I really enjoy this game format, and I really love Pokémon.

I quickly noticed there was several improvements I could do with the Docker-part of the source code. So I was very happy when the project decided to merge in my pull request with the improvements.

What I noticed working on this project, was that I had a lot of unstaged changes. So I end up doing git stash, git pull, and git stash pop a lot. After some thorough research (first hit on a simple Google-query), I found out about git-pull's autostash feature.

git pull --autostash

From the git-pull(1) man-page

--autostash
--no-autostash
Before starting rebase, stash local modifications away (see git-stash[1]) if needed, and apply the stash entry when done. --no-autostash is useful to override the rebase.autoStash configuration variable (see git-config[1]).

This made pulling in new changes from the remote repository so much easier. It is also possible to set a git-config variable to make this the default behaviour of git-pull.

Enjoy!