Computer Science, asked by nibeditasaiki6094, 1 year ago

How to create a new branch in git?

Answers

Answered by N3KKI
0

1)From the repository, click + in the global sidebar and select Create a branch under Get to work..

2) From the popup that appears, select a Type (if using the Branching model), enter a Branch name and click Create...

3) After you create a branch, you need to check it out from your local system. Use the fetch and checkout commands that Bitbucket provides, similar to the following:

$ git fetch && git checkout <feature>..

4) Make your changes locally and then add, commit, and push your changes to the <feature> branch:

$ git add .

$ git commit -m "adding a change from the feature branch"

$ git push origin <feature>......

5) Click the Source page of your repository. You should see both the master and the <feature> branch in the branches dropdown. When you make commits to the feature branch, you'll see the files specific to that branch...

Hope you understood..

Mark it as brainliest answer

Similar questions