The article directories
-
-
- SVN Usage Procedure
- The difference between SVN and Git
- SVN Checkout vs. SVN Create Repository here
- Idea How to associate SVN
-
SVN Usage Procedure
Step 1: create a local directory, SVN checkout sets the current directory as SVN directory, and a hidden file of SVN will appear, indicating that step 1 is complete. Step 2: SVN update downloads the remote code, or SVN update to version downloads the remote code of the specified version. Step 3: SVN add(add a common directory or file to the SVN management, turn it into a SVN directory or file, which appears in the tongji directory. SVN hide the file) + SVN commit, and the code can be submitted.
The difference between SVN and Git
The biggest difference: Git is distributed, with local and remote branches, while SVN is centralized, and the local is only a mirror of the remote repository. SVN has no concept of staging area, so SVN update (i.e. pull code) is equivalent to git fetch && git rebase/git merge.
Git clone http://xxxx corresponds to SVN checkout
Second, the submission code:
Git: git add git commit git push
SVN: SVN add SVN commit (two steps, no concept of temporary storage, directly commit to the remote)
Git add corresponds to SVN add git commit no SVN corresponds to git push no SVN corresponds to git commit &&git push corresponds to SVN commit
Third, commit code conflicts
Git: First git stash stores local changes since the last pull, then git rebase or git merge, and finally git push.
Git fetch &&git stash pop: git fetch &&git stash pop: git fetch &&git stash pop: Manually handle the final git push release
Git pull = git fetch + git merge
SVN: Update the SVN directly, handle the conflict manually, and commit the SVN at last
If commit failed, run SVN update to pull the remote code, manually handle the conflict, and finally commit SVN
Mapping between Git and SVN
There is no SVN equivalent of git stash, because SVN has no concept of staging area, and because SVN has no local code (local is a remote mirror), you can pull the remote code directly instead of staging. Git fetch &&git merge/git rebase git fetch fetch &&git merge/git rebase There is no SVN equivalent. SVN has no concept of a staging area. Git push release code corresponds to SVN commit
Fourth, pull the remote code for the first time + pull the remote code before each code is written
Git:
Git fetch && git merge Git fetch && git merge git fetch && git merge git fetch && git merge If you have changed the code locally since the last time you pulled the code, save the local change first and then pull the code with git stash stash stash stash git pull && git rebase and merge the code. Git Stash pop Remove the staging area and handle it manually if there is a conflict.
SVN: SVN update. If there is a conflict, handle it manually.
Fifth, switch versions in the same directory
Git checkout < branch> checkout branch
Sixth, the synchronization between different branch versions, development does not involve, skip.
SVN Checkout vs. SVN Create Repository here
SVN Checkout differs from SVN Create Repository here. The former is code rights management, the latter is document rights management. SVN checkout is equivalent to git Clone pull code and Git checkout checkout/switch branch. It is used for the first pull code and code management. SVN Create Repository here is equivalent to VSS for document management.
Idea How to associate SVN
The first step is to install the SVN and its Chinese package locally (the Chinese package can be installed or not installed), and then SVN can be used to manage the code.
The second step, based on the first step, if you want to use IDEA to manage SVN, you need to find the SVN installation package, repair the SVN on the local machine, and then you have svN. exe.
The third step, IDEA management local machine is SVn.exe.
In the fourth step, the Version management tool is selected as SubVersion, and then the Version Control Tab is displayed at the bottom of the lower left of IDEA, which is convenient for programmers to manage Version.