Hands-On Lab Guidelines
Hands-On Lab Guidelines
cd <local_working_folder>
git clone <repository_url>
cd <repository_name> /* e.g. OOLT.ICT.20212.StudentID.StudentName */
git branch /* let you know which branch you’rgit e working on */
git checkout -b <your_branch> /* create and switch to your new branch */
git
After checking carefully the new branch code, the leader can go to the Bitbucket to Create merge request,
then Approve merge request to merge the code to the master branch.
1
git pull origin <your_branch>
h. Pull and resgitolve conflicts
After you commit and push to the remote repository, if there is any conflict when creating merge request,
you need to resolve conflicts.
git checkout master
git pull origin master
git checkout <your_branch>
git rebase master
git add -A
git status
git rebase –continue
You need to resolve conflicts by checking the resources that have conflicts. There are both versions in the
resources so that you can observe and make decisions, e.g.
Having conflig:
<<<<<<< HEAD /* master branch in the remote repository */
suggestor.setClientId(clientID);
suggestion = suggestor.translate(input).replaceAll("-", " ");
======= /* your branch in the local repository */
suggestion = suggestor.translate(input);
>>>>>>> Your comment for the update
Merging (merge your local repository version with the replaceAll() method, remove the first
statement of the remote repository):
suggestion = suggestor.translate(input).replaceAll("-", " ");
Then continue, force to push the merged version to the remote repository
git push origin <your_branch> -f
https://tedu.com.vn/video/bai-1-gioi-thieu-tong-quan-ve-he-thong-quan-ly-version-vcs-155.html
Tạo
2
3