Git branching with remote

Posted on Updated on

Still learning git I have now copied code programmed by our student programmer into a branch on GitHub. I first created a local branch called ‘fake’ (the code is generating faked data), then copied the relevant part of the code into the subdirectory of the branch and finally pushed the changes to GitHub.

In /smartphonebrainscanner2-core/ I did the following commands:
$ git branch
* master
$ git branch fake
$ git push origin fake
$ git checkout fake
$ cd src/hardware
$ cp -r ~/projects/riis/smartphonebrainscanner2-core/src/hardware/fake/ .
$ git add fake/
$ git commit fake/
$ git push origin fake

Now we got a branch on GitHub for the “fake” tree.

#git #smartphonebrainscanner

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s