That way we can rename the branch locally and erase the evidence of any mistakes from the remote source. Git branch -m wrong correct # Rename branch locally git push origin :wrong # Delete the wrong branch git push -set-upstream origin correct # Push the new branch and set local branch to track the correct remote So we create our feature branch, name it according to the company policy, develop it on this branch… only to find out there is a spelling error in the branch name… There are a couple of ways to fix it (after all we are programmers, and solving problems is what we do) but we can do it using the git branch function. This involves, for example, creating a task acceptance process and branch naming policy. Wrong branch name?Īt some point, every IT company realizes the need to standardize working with GIT. But do you know all their features? This article will show you some tips, tricks and functions that you should know to fully use the potential of GIT. and then we are finally allowed to leave the buildingĪt the core of our work with GIT are branches.For example, in case of emergency of fire the expected behavior would be: ![]() A single technology to rule them all, and reign above all the differences: GIT, the beloved version control system.Īll of us know GIT and we are always ready to use it. Clearly, one side has little in common with the other side, but there is one thing that bridges the two realms. Cherry-pick – in case you just want friends to commit to your branchīeing a front-end developer involves getting into numerous arguments with the back-end guys, usually over whose technology is better.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |