Reputation: 616
I'm using Git with many feature branches.
When I want to update master
and featureX
# Update master
git checkout master
git pull
# Update featureX
git checkout featureX
git pull
It works and simply. But it takes a while because I run git pull
including fetch
twice.
In another way...
# Update featureX
git checkout featureX
git merge origin/featureX
OK, I fetched only once. But I have to specify origin/featureX
even the branch is upstream.
Is there an alias for upstream, or easy way to update branch without fetching?
Upvotes: 1
Views: 47
Reputation: 2266
From this answer, an alias for upstream is
git rev-parse --symbolic-full-name --abbrev-ref @{u}
Upvotes: 2