Updating function branches with pull

When I work on a local function branch, I prefer to reinstall it to keep the history clean. I have an example below my workflow.

My branch feature1is local (no tracking) and created master. Please note that I have always configured mine git pullto reinstall.

git checkout master
git pull
git checkout feature1
git rebase master

The itch that I have with this workflow is that it is ineffective in terms of steps. I work exclusively from my branch feature1(I don’t need to revise master, except to pull the last one), so I just don’t understand why I need to add an additional level of indirection in order to get the latest changes from the source, so I wonder if this is the same if Will I take a few shortcuts and rearrange them to my remote tracking branches instead? Here are some ways:

git checkout feature1
git fetch
git rebase origin/master

Or even shorter (I can combine the selection and reinstall into one using pull):

git checkout feature1
git pull origin master

Will they all be valid? Are they recommended? I can't think of shorter / more convenient ways of doing this, so other ideas are also welcome.

feature1 master origin, , master , , .

+3
2

, .

, , , / , 4 ( , , ).

, , , 3 .

, git. , , .

, git rebase origin/master - . , git rebase master, . , , . , - . , , , , , , .

, script, , .

, pull fetch + merge. , . 2 1

+2

-, git rebase.

, , 1) git 1 2) git fetch 3) git rebase origin/Master

, , , git checkout 1) git fetch 2) git /

0

All Articles