Posted: June 15th, 2010 | Author: mindtonic | Filed under: Git | Tags: git, remote branches | No Comments »
I was looking for a way to track a local branch to a remote repository. I came across this great plugin: http://github.com/webmat/git_remote_branch
Posted: May 28th, 2010 | Author: mindtonic | Filed under: Git | No Comments »
This information is readily available from Github after you create a new repository, but I have been bouncing around a lot of different computers lately, so I needed a refresher course. Running these statements at the command line will set the global Username and Email for all of your repositories.
git config --global user.name "Jay Sanders"
git config --global user.email my-cool-email@spam.com
Posted: May 28th, 2010 | Author: mindtonic | Filed under: Git | Tags: git, Github, Heroku | No Comments »
From: http://www.mail-archive.com/heroku@googlegroups.com/msg00350.html
Can I get suggestions on how to move my app from GitHub to Heroku and back?
You can do this if you’re using git locally. The magic of
decentralized revision control makes it possible, since every checkout
is a full repository in its own right. What I suggest is adding two
different remotes to your local checkout, and then you can push to
both. Something like this:
git remote add github [EMAIL PROTECTED]:myaccount/myapp.git
git remote add heroku [EMAIL PROTECTED]:myapp.git
Then you can do “git push heroku” and “git push github”, or pull, or
diff, or whatever. You could also name one origin, which will make it
the default, but it would probably lead to less confusion if you had
to explicitly name where you wanted to push or pull from each time.
In my specific case, I am already hosting my codebase on Github. I want to keep the main repository there because I like all of the available features. I also want to be able to work with collaborators and allow them to make commits to the master Github repository.
Heroku is amazing, but when you push to the Heroku repository it automatically restarts the application. Using these methods, I can maintain a situation where one person is able to manage what actually goes “live” to Heroku, while everyone else can work away on Github using the normal collaboration procedures.
Result, the best of both worlds!