当我有本地文件更改时,如何使用更少的命令从 master git rebase [英] How do I git rebase from master in fewer commands when I have local file changes
本文介绍了当我有本地文件更改时,如何使用更少的命令从 master git rebase的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如果我在一个功能分支上工作,并且我想从主分支中获取和变基更改,还有比这更短的方法吗?
If I am working on a feature branch, and I want to fetch and rebase in changes from the master branch, is there a shorter way to do it than this?
git stash
git checkout master
git pull
git checkout my-feature-branch
git rebase master
git stash pop
请注意我还必须如何存储,因为我编辑了一个不想提交的配置文件.
Note how I have to stash too, because I have edited a config file that I don't want to commit.
如何用更少的命令执行此操作?
How can I do this in fewer commands?
推荐答案
一行版本:
git pull --rebase --autostash origin master
这篇关于当我有本地文件更改时,如何使用更少的命令从 master git rebase的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文