VCS Operations
Index
Pull Code
This operation does not merge unless there are local commits.
git -c core.quotepath=false -c log.showSignature=false fetch origin --recurse-submodules=no --progress --prune
Push Code
Commit and merge instructions
- Click the commit button โ at the top right.
- A dialog will appear on the left, select the files to commit and push.
- Click "Commit and Push" on the right.
- It is recommended to check the differences before pushing.
Merge Code
Example: Merging code from
dev
branch intomaster
.
- Switch to the
master
branch. - From the menu bar, select: git -> merge -> select the branch -> merge -> resolve conflicts -> apply -> push merge commit.
Images๏ผ
Compare Specific Files and Branches
Right-click -> git -> Compare with branch -> Select the branch
cherry-pick Best Practices
ใTipใ
cherry-pick
simply means merging one or more commits from one branch into another.- For example, merge a few commits from
main
branch intodev
branch. - Conflicts may arise during the merge, and the solution is the same as the merge code process outlined above.
ใNoteใ
View Commit History of a Specific File
Right-click -> git -> Show history
Rollback Version
Select the corresponding branch, then select the commit to roll back to, and perform the rollback. Image: