Top Banner
Chapter 4 The Online Repository CREATE A REPO ONLINE ON GITHUB.COM
16

Chapter 4 The Online Repository

Jan 07, 2016

Download

Documents

hadar

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
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Chapter 4 The Online Repository

Chapter 4

The Online RepositoryCREATE A REPO ONLINE ON GITHUB.COM

Page 2: Chapter 4 The Online Repository

1) Go to github.com and sign in

2) Spot the “create new repository” tab

3) Enter the required values

1.

2.

Page 3: Chapter 4 The Online Repository

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.

Page 4: Chapter 4 The Online Repository

1) Go to your Github account.

2) Refresh the repo page.

3) There it is !

1.

2.

Page 5: Chapter 4 The Online Repository

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

Page 6: Chapter 4 The Online Repository

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

Page 7: Chapter 4 The Online Repository

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

Step : 1

Step : 2

Step : 3

Page 8: Chapter 4 The Online Repository

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

Page 9: Chapter 4 The Online Repository

Clone the repository on your desktop.

Page 10: Chapter 4 The Online Repository

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.

Page 11: Chapter 4 The Online Repository

1. Add files to be staged for commit.

2. Commit changes.

3. Push files to online github.

Page 12: Chapter 4 The Online Repository

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

Page 13: Chapter 4 The Online Repository

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

Page 14: Chapter 4 The Online Repository

The Pull Request

Page 15: Chapter 4 The Online Repository

1.

2.

The y1ash’s side if story

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

2. Add a title and description(Optional).

Page 16: Chapter 4 The Online Repository

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.