Giter Site home page Giter Site logo

sync-git-from-svn's Introduction

sync-git-from-svn

Perl script that git-adds svn-tracked files to git.

I use this script to hold all my svn checkouts needed for some project in one local git repository, and hold svn checkouts in sync (please inform me if git-svn can do this for multiple svn repositories).

Here is an example usage (please note: this is my first git usage, so not everything might be idiomatic):

$ # Make git repository.
$ mkdir gitrepo && cd gitrepo
$ git init
$ 
$ # Checkout svn repositories.
$ svn checkout http://svn.repo.url1/foo/trunk dir/foo
$ svn checkout http://svn.repo.url2/bar/trunk bar
$ 
$ # Add contents of svn repositories to git.
$ echo dir/foo >> .svndirs
$ echo bar >> .svndirs
$ sync-git-from-svn --all # or sync-git-from-svn dir/foo && sync-git-from-svn bar
$ git commit -m "Synchronized with svn."
$ 
$ # Work on a feature.
$ git checkout -b feature
$ # Implement your feature and commit to feature branch.
$ ...
$ 
$ # Commit your feature, but in the mean time, new svn revisions were 
$ # added to remote svn repositories.
$ # Synchronize master branch first.
$ git checkout master
$ svn update dir/foo
$ svn update bar
$ sync-git-from-svn --all
$ git commit -m "Synchronized with svn."
$ 
$ # Merge changes to feature branch.
$ git checkout feature
$ git rebase master
$ 
$ # Merge feature branch to master.
$ git checkout master
$ git merge feature
$ 
$ # Commit your feature to svn repository. Added files for feature are
$ # not tracked for svn, so you have to add them first.
$ svn add dir/foo/file1 dir/foo/file2 bar/file3 ...
$ svn commit -m 'Implemented feature' dir/foo
$ svn commit -m 'Implemented feature' bar

sync-git-from-svn's People

Contributors

myss avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.