Is it possible to make a merge in one command without committing and modifying the index?
Let’s say that I’ve got some cool tool for development and I keep it on a branch called ‘tool’. My product has many customizations and hence there are many branches used for development. Despite the fact that the tool is so groovy, I don’t want to commit them to any other branch.
With the above I get all the files I need to my current branch and I clean my index.
The question is whether this is achievable in one command? Maybe there’s some other good way to use git for my scenario? I’ve got to say that I don’t like
git stash though.
One Solution collect form web for “Is it possible to make a merge in one command without committing and modifying the index?”
There is no way in
git to perform these two actions in one command, but you could combine them using
bash by running it as:
git merge --no-commit tool && git reset
You could even alias that to something short, like
alias gtool="git merge ..." and then just run