What commands will you use to bring a new feature to the main branch?
Answer / Avnindra Vaidhya
1) Create a new branch for the feature development: `git checkout -b my-feature-branch`. 2) Commit changes in the new branch. 3) Push the branch to the remote repository: `git push origin my-feature-branch`. 4) Once the code review is done and the feature is tested, merge it into the main branch: `git checkout main`, then `git merge my-feature-branch`. If there are any merge conflicts, resolve them, commit, and push again.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is GIT stash?
What is the function of ‘GIT PUSH’ in GIT?
Name a few Git repository hosting services
What is ‘head’ in git and how many heads can be created in a repository?
What is the function of ‘git reset’?
What is the purpose of branching in GIT?
In git how do you revert a commit that has already been pushed and made public?
What is the syntax for “Rebasing” in Git?
Distinguish between git fetch and git pull?
What is ‘head’ in git?
What is git reflog?
What is the command you can use to write a commit message?