bash - How to switch back to previous branch after git pull? -


i'm thinking of refreshing git branch this:

git checkout master && git pull && git co - && git rebase master

if changes pulled origin previous branch gets overwritten , 'git co -' no longer returns previous branch.

(of course use name of branch, i'm looking applicable can transformed in alias.)

why not stay on branch ,

 git fetch origin master && git rebase origin/master 

and not worry branch switching?


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

javascript - addthis share facebook and google+ url -

ios - Show keyboard with UITextField in the input accessory view -