branch - Git: change HEAD -


i have repository on bitbuket 2 branches:

 $ git branch -a * master   remotes/origin/head -> origin/master   remotes/origin/master   remotes/origin/ng-1 

master contains old tool code, , ng-1 - new.

what want - switch master ng-1 when git pull executed - pull code "master" - new code.

let's - want "move" code master ng-1 - , ng-1 master.

as googled - can done with:

$ git update-ref head ng-1 

thus - "main default" branch became ng-1 , master saved "backup".

if go wrong - i'll can vice versa:

$ git update-ref head master 

am correct?

what want - switch master ng-1

// checkout new branch git checkout ng-1 

... when git pull executed - pull code "master" - new code

// pull "old" changes - if ng-1 forked master no update should pulled git pull origin master  // ng-1 contains "new" code well. 

Comments

Popular posts from this blog

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

android - How to create dynamically Fragment pager adapter -

1111. appearing after print sequence - php -