GitHub Configuration / Setup Branching and Merging Examples

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

Configuring, Using GitHub Branching and Merging


Recently, I had to work with a repository on GitHub, below are my notes on configuration, usage etc..

Note: To work with git there are many helpful utility’s. one rely widely used helpful utility is called bash-it, it will help with your branching and many more, available here.

First, sign-up for a GitHub account, easily done on http://github.com.
Then, go to http://github.com/new. create a new repository, simple steps to follow.

Below, I am working with a repository named coreos-kubernetes-generator

First lest clone the repository.

To add a file readme.txt, run the below.

To add all files/folder

To commit the file to your local cloned git repository.

To push all your changes to the master branch, just run the below.

To get the latest changes

Now, lets create a new branch, I will name this branch Version-02.

Now lets switch to the new branch Version-02.
Note: git uses the checkout option to switch to a different branch(or back to master).

Same as above, to add all changes.

To commit all changes.

Finally, to push all changes to github.

Now, login to github and merge and apply all changes to the master (if all is correct).

Since I am using tow-factor authentication so called Tow-step authentication, the extra steps below are required.

Lets configure our local Github properties.

The below will help for two factor authentication.

Enable user/password cache

Next time you push changes to github, it will ask for your user login name.
Then for password use your GitHub API/Two-factor key.

Like what you’re reading? please provide feedback, any feedback is appreciated.

Leave a Reply

Be the First to Comment!

avatar
  Subscribe  
Notify of