The idea is such that I made a branch (for example, branch1 ) with the master 'a, I worked in it and I want to do a git rebase master , but for example, I know that the master been updated. Next, I need to do this:
git checkout master git pull git checkout branch1 git rebase master git push ... Is it possible to update the local master 'and not switching from the current branch? What could be done one command to update and immediately rebase ?
UPDATE : I will try to clarify the question =). It would be very convenient for me to update the following local branch without switching to it. By "update" I mean not only the history of commits, but also the local files themselves, so that I can compare files or rebase based on the local branch. In other words, combine the first three commands in the above example. But, and this is quite an important "but", if possible avoid git checkout master .
In this example, the master shown only for some clarity. In a real project, there are several branches that are very different, and the number of files is beyond the limits, and therefore switching between these branches is quite a long procedure.