Skip to content

Latest commit

 

History

History
47 lines (37 loc) · 1.58 KB

githubcheatsheet.md

File metadata and controls

47 lines (37 loc) · 1.58 KB

GITHUB CHEATSHEET

Pulling from master to local repository

git init (only first time) git remote add upstream # (only first time) git pull upstream master

Pushing from local repository to personal fork. This is however only necessary when you plan on doing a pull request to the master

git push origin master

Committing changes to the local repository: git commit -m

Creating a new repository

  • Go to your own github page @ https://github.com/
  • Click New repository
  • Define a
  • Provide a description
  • Choose public (or private if you wish to pay the required fee of $7.00/month)
  • Choose wheter or not you wish to create the new repository with a README file
  • Click Create repository
  • Open your prefered terminal and execute the following git config --global user.name "Your name" git config --global user.email [email protected] mkdir cd git init
git commit -m 'First addition of all files' git remote add origin [email protected]:/.git git push -u origin master

Pushing a new repository into github

cd git remote add origin [email protected]:/.git git push -u origin master

Creating a new branch and switching to it right away

git checkout -b

Reverting a file to its last committed state

git checkout --