jeudi 12 mars 2015

Move back with git by moving a branch pointer


Vote count:

0




Let's consider this situation:



v devel
o--x--o--o--o--o--o
\
o--o
^ feature


I would like to move the devel branch to x and replace it with a new name:



v devel v fork
o--o--o--o--o--o--o
\
o--o
^ feature


From other questions on SO, I found that git update-ref or git rebase might help. However the solution I found is:



git branch -m devel fork
git checkout -b devel x # where x is the commit number `x`


Is this a correct solution?



asked 54 secs ago

coin

1,062






Move back with git by moving a branch pointer

Aucun commentaire:

Enregistrer un commentaire