Tuesday, October 13, 2015

Hands on With GitHub repository - Part I

1. Set up A repo

first of all few configurations we need to do for the git repository. 

1. name  => git config —global user.name = “testgitun”
2. email address => git config —global user.email = “testgitun.gmail.com”

Authentication with GitHub from Git 

When connecting to GitHub repository from Git, we need to authenticate with Github using either HTTPS or SSH
If connecting via HTTPS the password can be cached using a Credential Helper. 
If clone with SSH, we must generate SSH keys on each computer we use to pull or push from GitHub. 

2. Create A Repo 

To put project in GitHub, first we need to create a repository for it to live in. 
The Create New repository option is very easily locatable and To create a new repository, just need to provide the name and description of the project. 
Free accounts can only create public repos while the paid accounts can create private repositories. 

When creating a git repo, we have an option to add a README file. The examples in github is explaining few concepts around this. The github page itself gives option to 
edit the content and preview. Once after preview, we can commit. the commit can be into the same master branch or we can create a new branch for this commit and generate a pull request. 

When the pull request is generated, it appears on the github page and one can merge the changes and delete the branch that came in the pull request. 


3. Forking A Repo 

Fork is a copy of a repository. Forking allows us to do free experiments without affecting the original project. 

Below is the usual practice: 

- Fork Some one else’s project 
- Make bug fix
- Submit a pull request 


References:

No comments:

Post a Comment