My Git server has been crashed but I have my local copy. There were 2 branches(Branch-A and Branch-B) in the GIT. Right now, I am using Branch-A. Is there any way to get code of other branch? Thanks in advance.
Asked
Active
Viewed 46 times
0
-
2If you fetched `Branch-B` before the serve crashed then it's possible. Check what `git branch -r` show - if you see `Branch-B` just do `git checkout Branch-B`. – Arkadiusz Drabczyk Apr 09 '17 at 09:10
-
1Does `git branch ` show branch B? If yes it is available. Maybe even if it is remote `git branch -r` but I am not sure about that. Just try to checkout that branch – Sebastian Apr 09 '17 at 09:14
-
1Use `git branch` to list branches you have checked out locally at some point, and then `git branch -r` to list remote branches you haven't checked out locally but have been fetched. – Lasse V. Karlsen Apr 10 '17 at 09:14
-
I think, I have got solution. I need to live git server then push to origin of all branches. Problem solved. Thanks – Tasfin Apr 11 '17 at 10:10