• How to move your local git repository to github?
    1. Consider you have a local clone of some git repository at a directory called ROOTmacros. Start by making a bare copy at another location.
      mkdir tmp; cd tmp; git clone --bare ../ROOTmacros
      This will create for you a clone called ROOTmacros.git
    2. Go to github and create a new repository with the name ROOTmacros.git.
    3. cd ROOTmacros.git; git push --mirror https://github.com/erkcan/ROOTmacros.git
    4. Now you can remove the tmp stuff.
      cd ..; rm -rf ROOTmacros.git ; cd .. ; rm -r tmp
    5. If you want your old original repository instead follow the new github location by default, you need to edit the .git/config file:
      cd ROOTmacros; pico .git/config
      Find the line that starts with "url =", and edit that line: "url = /Users/erkcan/work/gitrep/ROOTmacros/.git" => "url = https://github.com/erkcan/ROOTmacros.git"
  • Checkout a package from github: git clone https://github.com/erkcan/ROOTmacros.git
-- ErkcanOzcan - 16 Oct 2014
Topic revision: r1 - 16 Oct 2014, ErkcanOzcan

This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback