I am a new git user and recently been handed with an out of date git repository to look after.
This is the original state ( output by git show-branch):
! [cr232] CR 232 Release
* [dev] Style Changes
---------------
* [dev] Style Changes
* [dev^] SMS 5.4
* [dev~2] Logo Change
* [dev~3] SMS 5.3
* [dev~4] SMS 5.2
* [dev~5] SIT R-0.3.3 EDW SMS Layers
* [dev~6] SIT Release R 0.3.0
+* [cr232] CR 232 Release
+* [cr232^] Dashboard Fix
+* [cr232~2] Release for system testing
Note that there is a branch called ‘dev’ at this point. Note that highlighted there are several references to dev (i.e. dev, dev^, dev~2 etc).
For my development purpose, I was trying to come up with a branch called ‘DEV’, all capital.
So I went ahead and create new branch (git branch DEV) and now running git show-branch –date-order:
! [DEV] Style Changes
! [cr232] CR 232 Release
* [dev] Style Changes
---------------
* [DEV] Style Changes
* [DEV^] SMS 5.4
* [DEV~2] Logo Change
* [DEV~3] SMS 5.3
* [DEV~4] SMS 5.2
* [DEV~5] SIT R-0.3.3 EDW SMS Layers
* [DEV~6] SIT Release R 0.3.0
+* [cr232] CR 232 Release
+* [cr232^] Dashboard Fix
+* [cr232~2] Release for system testing
Note that both dev and DEV are listed as branch. Note also that on the 5th line the references to dev have now changed to DEV (i.e. DEV, DEV^, DEV~2 etc).
What is the 5th line output referring to? I would expect it to remain “dev” instead of being changed to “DEV” as the descriptions next to it refers to the description of old work during “dev” branch.
I am trying to return back to how it was by modifying the DEV branch name to DV (running git branch –m DEV DV) and showing the branch now look like:
! [DV] Style Changes
! [cr232] CR 232 Release
* [dev] Style Changes
---------------
* [DV] Style Changes
* [DV^] SMS 5.4
* [DV~2] Logo Change
* [DV~3] SMS 5.3
* [DV~4] SMS 5.2
* [DV~5] SIT R-0.3.3 EDW SMS Layers
* [DV~6] SIT Release R 0.3.0
+* [cr232] CR 232 Release
+* [cr232^] Dashboard Fix
+* [cr232~2] Release for system testing
Note that the branch is now including DV and dev. Note also that the 5th line references to dev have now changed to DV (i.e. DV, DV^, DV~2 etc).
Is there any way to get back to how it was during original state in term of the DV references? Did the git got confused and renamed my historic information with a branch that is similar and only differs by capital case?
Please assist on how I can fix this. Thanks heaps