![]() As a little safety measure it does print the starting sha1 so you should be able to restore your old branch if anything goes wrong. I've only tested this a few times, so read it first and make sure you want to run it. Use it from your feature branch by running: ![]() TOPIC="$(git branch | grep '\\*' | cut -d ' ' -f2)" \Įcho "Freebaseing $TOPIC onto $NEWBASE, previous sha1 was $PREVSHA1" \ Install it by placing the following alias in your. At the very end, it will allow you to use whatever commit message you like for your newly "freebased" branch. I'm calling it git freebase! It will take your existing messy, unrebasable feature branch and recreate it so that it becomes a new branch with the same name with its commits squashed into one commit and rebased onto the branch you specify (master by default). I have created my own git alias to do exactly this. Next resolve conflicts and push feature branch into git: git add -all git commit -am resolve conflicts git push -u origin. Next step, you must pull code from master into feature branch: git pull origin master.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |