Git help: I need the commands to execute the following: I need a explanation and
ID: 3844176 • Letter: G
Question
Git help: I need the commands to execute the following: I need a explanation and example code for each.1.Push the master to the remote repository. To do so, you will have to pull changes from the remote repository and handle conflicts.
2.In handling conflicts, make sure not to lose any content, not to have any of the extra text added by Git to mark the conflicting parts, and to preserve the order of the information as it appears in the assignment . Use commit message “Final merge with conflicts fixed” for the additional commit after merging and handling the conflicts
3.Use commit message “Final merge with conflicts fixed” for the additional commit after merging and handling the conflicts.
4.Tag the current version of the master as “V1” and push the tag to the remote repository. Use a lightweight tag. Git help: I need the commands to execute the following: I need a explanation and example code for each.
1.Push the master to the remote repository. To do so, you will have to pull changes from the remote repository and handle conflicts.
2.In handling conflicts, make sure not to lose any content, not to have any of the extra text added by Git to mark the conflicting parts, and to preserve the order of the information as it appears in the assignment . Use commit message “Final merge with conflicts fixed” for the additional commit after merging and handling the conflicts
3.Use commit message “Final merge with conflicts fixed” for the additional commit after merging and handling the conflicts.
4.Tag the current version of the master as “V1” and push the tag to the remote repository. Use a lightweight tag. Git help: I need the commands to execute the following: I need a explanation and example code for each.
1.Push the master to the remote repository. To do so, you will have to pull changes from the remote repository and handle conflicts.
2.In handling conflicts, make sure not to lose any content, not to have any of the extra text added by Git to mark the conflicting parts, and to preserve the order of the information as it appears in the assignment . Use commit message “Final merge with conflicts fixed” for the additional commit after merging and handling the conflicts
3.Use commit message “Final merge with conflicts fixed” for the additional commit after merging and handling the conflicts.
4.Tag the current version of the master as “V1” and push the tag to the remote repository. Use a lightweight tag.
Explanation / Answer
1. The git-pull command is a convenience function that does git-fetch and git-merge
To pull the master branch : git pull origin master:master
2. To fix the conflicts:
If you're already in conflicted state, and you want to just accept all of theirs:
If you want to do the opposite:
If you want to keep the master version of the conflicting files:
or
Open your favorite text editor, and navigate to the file that has merge conflicts.
To see the beginning of the merge conflict in your file, search the file for the conflict marker <<<<<<<. When you open the file in your text editor, you'll see the changes from the HEAD or base branch after the line <<<<<<< HEAD. Next, you'll see =======, which divides your changes from the changes in the other branch, followed by >>>>>>> BRANCH-NAME.
Decide if you want to keep only your branch's changes, keep only the other branch's changes, or make a brand new change, which may incorporate changes from both branches. Delete the conflict markers <<<<<<<, =======, >>>>>>> and make the changes you want in the final merge. In this example, both changes are incorporated into the final merge:
Add or stage your changes, using: git add .
3. git commit -m "Final merge with conflicts fixed"
4. To push the code: git push <REMOTENAME> <LOCALBRANCHNAME>:<REMOTEBRANCHNAME>
To tag the commit: git tag v1.4-lw <<CHANGESET NUMBER>>(Here lw specifies light weight)
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.