jupytercalpoly / team-spirit

Gather information for Summer 2016 Design Driven Development teams
BSD 3-Clause "New" or "Revised" License
4 stars 5 forks source link

Created charmander.md #5

Closed charnpreetsingh closed 8 years ago

willingc commented 8 years ago

Nicely done @charnpreetsingh185 aka Charmander. Happy to merge this PR.

In future PRs you will want to begin getting in the habit of developing on a branch:

git branch branch-name
git checkout branch-name

or

git checkout -b branch-name

It will save you merge headaches later.

Good job. 📱 🔐

charnpreetsingh commented 8 years ago

Thanks! I will keep that in mind for next time. One problem I came across was that Github would not let me do a pull request when I cloned the repository. However, when I forked it, I was able to do a pull request. Why is that?

willingc commented 8 years ago

Great question @charnpreetsingh185.

The simple answer is that you do not have privileges sufficient to directly push to the repo. Instead, you must fork the project which is your copy of the project on GitHub, Gitlab, Bitbucket.

For common language let's define a few things:

git remote -v is a handy command. It tells you what remote repositories are named.

git remote ... is the command that will allow you to name and rename the nicknames that you give for repos and their locations.

You can add a fork to your existing local repo. Basic steps:

Cool! Now we want to update what the remotes are named and the URL for the remotes. Let's start by renaming the existing origin remote to upstream:

git remote rename origin upstream

Running git remote -v, the only remote that exists is upstream. Great that's what we want.

Now skim the GitHub doc here (basically look at the pictures).

Now let's get the URL for the charnpreet185/team-spirit repo. Click the green download/clone box's arrow:

screen shot 2016-05-26 at 7 26 33 am

You will want to use the URL https://.... link if you have not yet set up your ssh. Otherwise click 'use SSH' to get the URL.

On the command line, execute:

git remote add origin <URL>

Now you should have two remotes: origin and upstream. Let's check with git remote -v.

Let's push your local contents to the origin repo (your GitHub fork of the upstream repo):

git push origin master

Success!