Chapter 4 The Online Repository

Post on 07-Jan-2016

24 Views

Category:

Documents

3 Downloads

Preview:

Click to see full reader

DESCRIPTION

Chapter 4 The Online Repository. Create a repo online on github.com. Go to github.com and sign in Spot the “create new repository” tab Enter the required values. 1. 2. - PowerPoint PPT Presentation

Transcript

Chapter 4

The Online RepositoryCREATE A REPO ONLINE ON GITHUB.COM

1) Go to github.com and sign in

2) Spot the “create new repository” tab

3) Enter the required values

1.

2.

1) To push your local content (Commits) to online repo, You will need a key to be connected online, It is called a SSH key. You can find it on github.

2) First you have to ADD the local repository connection, then you can PUSH it.

3) After setting up the connection, you can push it online.

4) Check you gitog.

1.

2.

3.

4.

1) Go to your Github account.

2) Refresh the repo page.

3) There it is !

1.

2.

Fork and Pull Requests How to fork and push a repository from different account.

Things to take a note of,In this part we are going to fork a repository

Owned by ,Yash03

Name : Testing

The account which will fork it is : y1ash

Logged in as y1ash, seeing repo – “Testing” of yash3shah.

1. Testing – yash3shah 2. Fork testing to y1ash 3.Forking Testing.

Step : 1

Step : 2

Step : 3

1. Forked repo in y1ash 2. yash3shah’s news feed

Clone the repository on your desktop.

1.

2.

3.

4.

1. Open Desktop -> Github,You can see the Testing repo.

2. Open shell, write -> git remote,You shall see two files, origin and upstream. Upstream is the stream of your(y1ash) repo (testing) that is to be uploaded to the original repo(yash3shah->testing).

3. Open a file, change it.

4. Open shell and you’ll see the modifications.

1. Add files to be staged for commit.

2. Commit changes.

3. Push files to online github.

You can see in github, in y1ash’s profile that in the Tasting repo there are 4 commits.

But in yash03’s profile, in testing repo there is only ONE commit. It’s because the commits that y1ash made are in his repo, and not reflected back in the original repository. Now if y1ash wants to join his repo to the original repo, what he should do

The Pull Request

1.

2.

The y1ash’s side if story

1. Go to Testing repository, Initiate a “Pull request”.

2. Add a title and description(Optional).

1.

2.

1. You can see that y1ash has created a pull request.

2. Just review it and if it is good enough you can merge it.Github can automatically merge the repositories, so you need not to worry about that, unless there is a conflict, then you will have to merge it manually.

top related