How to use GIT-SVN

Source: Internet
Author: User
Tags how to use git

    • Cloning code from SVN
git svn clone https://192.168.1.3/svn/project-name
    • GIT-SVN initialization
git svn init (svn remote URL) git svn fetch or git svn fetch-r 1342:head (fetch only starting from one of these versions)
    • Get the latest code
git checkout mastergit svn rebase
    • To create your own branch
git branch
work
    • Commit after modifying code
git commit-a-M "message" Daily modifies and submits git checkout-b workgit commit-a
    • Update your own branch after getting the latest code
git checkout workgit rebase master
    • Merging main branches
in the GIT-SVN environment, it is recommended to use the Rebase mode merge to preserve the historical state of the merge branch, while the rebase is to spell two branches into the same branch, and the merged branches are no longer displayed separately in the version history.
    • Resolve Conflicts
Save git Add conflict file after edit conflict git rebase--continuegit svn dcommit
    • Push to a remote SVN server
git svn dcommit
    • Add a remote GIT server
git remote add origin (Git remote URL)
    • Push to a remote GIT server
git push Origin--all
    • Set Ignore file
git svn show-ignore shows SVN's existing ignore content git svn show-ignore >. git/info/exclude will not commit. gitignore file to Svngit svn create- Ignore automatically establishes the corresponding. gitignore file, which will be submitted to SVN in the next

How to use GIT-SVN

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.