Showing posts with label git. Show all posts
Showing posts with label git. Show all posts

Wednesday, June 25, 2014

git - change branch to master

We have been preparing our blog to document our progress during RGSoC for what seems like an eternity.

First we wrote and entire blog from scratch in Sinatra. We realized that it really needed a lot of work to acquire all the capabilities that we wanted it to have. Stephanie found Nesta, a ruby CMS built with Sinatra. So we abandoned the work we had done and started on the new blog. It has been a few weeks now and it is almost ready. There are a lot of things you need to manually configure in Nesta.

Last night when we were working on it Steph pushed and broke the blog. I had pulled these changes into my master without realizing it. Luckily I had a branch that still worked properly so I changed that branch into the master and force pushed it with the help of these lovely and helpful directions. 
Thanks again stackoverflow.

Tuesday, May 13, 2014

Git & GitHub


GitHub Video Tutorials

add a  remote origin to your git repo 

Instead of removing and re-adding, you can do this:
  $ git remote set-url origin <git@github.com:whatever.git>

To check your remotes are correct:
  $ git remote -v

newbie notes: 
  • make sure you are in the directory you want to add the remote to and that you are on the master branch
  • don't add the <> brackets, just put the git repo in there ie: git@github.com:whatever.git
  • use the SSH clone URL in the right column of the git repo you want to push and pull from
  • (super newbie note) don't type in the $ sign, this means type this in your terminal


git deleting branches

To delete a local branch
git branch -d the_local_branch

To remove a remote branch (if you know what you are doing!)
git push origin :the_remote_branch