Git client - Visual tool Fork uses





Guyu 2022-8-18 16:20:29





What is Fork?

When we are in the process of multi-person collaborative development projects, Git is an indispensable code hosting tool, but cumbersome operation commands, abstract file status, and multiple different branches need to spend a lot of time for allocation management and maintenance. So far Fork With a more minimalist style, it is more intuitive and convenient to switch and operate the file tree view.
Fork is a Git visualization tool. Fork has a project version control software with a visual interface, which is suitable for Git project management.

Official website: https://git-fork.com/




Functional Overview



Guyu 2022-8-18 16:45:14

Guyu 2022-8-18 16:45:27




Early stage: remote warehouse clone Fork local



① First clone the HTTPS (SSH is also OK) path code link of the project warehouse Coding and copy it:

Guyu 2022-8-21 10:39:49



②Click Clone in the File menu at the top of the Fork and the following box will pop up:

Guyu 2022-8-21 10:38:13



③Fill in the corresponding remote warehouse address in the pop-up dialog box,
Repository Url: the path of the remote warehouse clone (HTTPS);
Parent Folder: the directory file that you clone and save to the local (personally usually put it in D\work\) , select the local path where you want to put the project, select the project name, and click clone to visually display the entire latest branch code.


  • Note: If you want to open different project repositories in the local folder, you need to select open Repository in the File menu at the top of the Fork, and then select the local path file name of your cloned project to open it.


Description of basic terms in Source Tree:

Clone/Create (clone): Load from the remote warehouse URL to create a local warehouse that is the same as the remote warehouse.
Commit: Upload the temporary storage area file to the local code warehouse.
Push (push): Synchronize the local warehouse to the remote warehouse. Generally, pull (pull) once before pushing (push) to ensure consistency (very careful: in this way you can achieve the state of synchronizing with other people's latest code, and at the same time, you can avoid many unnecessary questions).
Pull: Obtain information from the remote warehouse and synchronize it to the local warehouse, and automatically perform the merge operation (git pull=git fetch+git merge).
Get (fetch): Obtain information from the remote warehouse and synchronize it to the local warehouse.
Branch: create/modify/delete branches.
Merge: Merge multiple files with the same name into one file, which contains all the contents of multiple files with the same name, and the same contents are offset.
Storage (git stash): Save the job site.
Discard: Discard changes, restore file changes/reset all changes, and throw back staged files to unstaged files.
Label (tag): Add a label to the project.
Workflow (Git Flow): When a team works, each person creates their own branch (branch), and submits it to the master branch after confirming that it is correct.
Terminal: You can enter the git command line.
Every time you pull and push, you don’t need to enter the command line of the password every time: git config credential.helper osxkeychain sourcetree.
Checkout: switch between different branches.
Add (add): Add files to the cache.
Remove (remove): remove the file to the cache.
Reset (reset): Go back to the most recently added (add)/commit (commit) state.









Fetch

fetch means "bring, fetch", here it is extended to fetch the code.
The git fetch command is usually used to synchronize the remote warehouse to the local warehouse, but without merging, it will not affect your workspace.



Pull

pull means "pull", here it is extended to pull code.
The git pull command is used to synchronously pull the remote warehouse code to the local warehouse code and merge it into the workspace.



Push

push means "push", which is extended to push the code to the remote warehouse.
The git push command is used to push the update of the local branch to the remote warehouse and merge it into the workspace.



Stash

The git stash command is to temporarily store all modifications in the local workspace to stash, and it can be taken out at any time; common application scenarios are to resolve conflicts and switch branches.



Local Changes

Locally changed code, (after selecting a file with the mouse, you can directly press the space key (SpaceKey) to automatically open the comparison between the code before modification and the code after modification)




Unstaged

Unstage: Cancel the staging area (unstaged), the state that is not tracked by Git is called the Unstage state



Staged

Stage: In the staging area, the code is temporarily stored in the local warehouse but not uploaded. The state that has been tracked by Git is stage state, including staging state and staged state.





All Commits

all committed branch code



Branches

View the local branch, the branch is newly added for itself.



Remotes

Remotely



origin

origin



Tag

Label



Stashes

Staging library




How to resolve code conflicts

Temporary completion! An example of a frequently occurring merge conflict is as follows

Guyu 2022-8-22 10:23:27

The conflict code is as follows

Guyu 2022-8-23 10:55:09










doubt:

After forking someone else's warehouse, the original person updated the warehouse again. How to keep your own code consistent with the original warehouse? How to submit your own changes to the original repository? How to simply use operations in the Fork tool.

①Restore the locally modified code before switching branches;

undone…














Note:
Likes, comments, and reprints are welcome. Please give the link to the original text in an obvious place on the article page
. Those who know, thank you for reading my article in the vast crowd.
Where is the signature without personality!
For details, please follow me
and continue to update

Scan to have a surprise!
© 2022 08 - Guyu.com | [Copyright infringement must be investigated]

Guess you like

Origin blog.csdn.net/weixin_49770443/article/details/126408297