Track library hosted on github within my own local repository?

I have a project that I’m using git locally to manage my source code. There is an open source library on github that I want to use in my app, but I want to make sure that if there are changes on the public github repository I can easily integrate them with my code. What’s the best way to do this?

  • How can I revert my changes using 'git pull'?
  • How to completely clear git repository, without deleting it
  • hg to git conversion and subrepo merge
  • Is Branching the right way to manage two (or more) versions of the same project?
  • How to keep .git folder out of a Cloned Eclipse Project
  • Subversion or Mercurial SPI - What API shall a server implement?
  • Git: Remote Branch Availability on Clone of Clone
  • TFS workflow variable for git repository root
  • Git log shows different author email when committing vs merging on GitHub
  • Is it possible to get commit logs/messages of a remote git repo without git clone
  • Using Git or Mercurial, how would you know when you do a clone or a pull, no one is checking in files (pushing it)?
  • Linux kernel “historical” git repository with full history
  • One Solution collect form web for “Track library hosted on github within my own local repository?”

    Use a git submodule. It allows you to track the remote but also allows you to bind versions of your code to versions of the remote. They aren’t trivial to use so read up a bit on git submodule {add,init,update}

    Git Baby is a git and github fan, let's start git clone.