Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1106091
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T01:44:15+00:00 2026-05-17T01:44:15+00:00

How can I clone a git repo from my laptop (at home) to a

  • 0

How can I clone a git repo from my laptop (at home) to a server (at university) while getting most of the repo from a third (svn) repo at another uni that is the main codebase. I’d like to minimise the amount of home<->uni traffic by maximising uniOne<->uniTwo traffic.

this is what I have now on Laptop:

--o--o--o---o---o---o git-svn trunk  
         `--o--o-o--o git mybranch  

this is what I would like to get on uniOne:

--o--o--o---o---o---o git-svn trunk <-- from uniTwo  
         `--o--o-o--o git mybranch  <-- from Laptop

After cloning the repo should be able to pull branches from Laptop.

I have tried: on uniOne: git-svn clone uniTwo, git remote add Laptop, but then git fetch wants to get the whole thing from Laptop. I thought maybe using git clone –depth x Laptop and then graft them together might work but it still requires all of the source files to be transfered Laptop->uniOne, not just the changes. I could try to export all patches from Laptop and apply them on top of a fresh svn checkout then get it to track the branch on my Laptop (if that is possible) but it would be easier to wait until I am next at uni and then just clone normally.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T01:44:16+00:00Added an answer on May 17, 2026 at 1:44 am

    Let’s define your repositories:

    • git-svn <– this is the Subversion repository at University
    • uni/master <– this is a Git repository at your University. This is jus a “fetching repository” that gets the latest history from the Subversion repo.
    • laptop/master <– This is the Git repository on your laptop. This is where you work.

    I would suggest the following setup:

    Create uni/master by doing git svn clone of git-svn.
    Automatically or regularly update uni/master with the latest changes from git-svn by running git svn rebase (trigger with a commit hook, cron-job, or manually every time you’re at Uni).

    Create laptop/master by cloning uni/master. Here you can commit locally as often as you want. When you are at University, get the latest changes from uni/master by running git pull --rebase (you always have to do –rebase to keep history linear, because SVN won’t understand git-branches).

    When you want to push changes from your laptop back to git-svn, you have to configure the git-svn remote on your laptop/master first:

    git svn init https://url.to.uni-svn-repo
    

    Now you can push your latest changes back to uni-svn with git svn dcommit. Note that you might have to update the reference to the latest commit in uni/master first. first:

    git update-ref refs/remotes/git-svn refs/remotes/uni/master
    

    DO NOT attempt to push from your laptop/master to uni/master. This will only bring chaos as the rebasing/rewriting history will just confuse Git when it tries to sync with git-svn again.

    See also http://www.tfnico.com/presentations/git-and-subversion where I’ve started collecting up a bunch of tips for working with Git and SVN together.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

After successfully cloning my repo from heroku and added another remote 1/ git clone
I currently have a local clone of a repo from our company git server.
I am trying to clone a repo to my laptop from my main PC.
Here's my setup... Laptop (Mac) - git clone of svn repository Thumb drive -
I am trying to pull or clone a git repo from my joyent smartmachine
I'm trying to use git on windows to clone a remote repository. I can
If there is anyone that can help me understand why this git repo isn't
I cloned a project from github with git clone --mirror . That left me
I am brand new to Git, and I make making the leap from SVN.
When I try to push to my git repo (on an HTTPS server) i

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.