![]() Then you can switch back to your new feature branch and finish your work. You switch back to the master branch, make the change, and push it live. You haven't finished your new feature, but you get a request to make a rush change that needs to go live on the site today. You create a new branch and start working. Let's say you need to work on a new feature for a website. ![]() Here's an example of how Git branches are useful. This lets you more easily work with other developers, and gives you a lot of flexibility in your workflow. Git lets you branch out from the original code base. The '-D' option forcefully deletes the branch regardless of its merged status. Branches can be deleted using 'git push origin -delete my-branch-name' for remote branches and 'git branch -d my-branch-name' or 'git branch -D my-branch-name' for local branches.Merging branches involves ensuring the working tree is clean, checking out the branch to merge into another and then running the 'git merge my-branch-name' command.If the branch already exists on the remote, the 'git push' command can be used. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |