Skip to content

Instantly share code, notes, and snippets.

@gabeborges
Last active December 22, 2015 20:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gabeborges/6528778 to your computer and use it in GitHub Desktop.
Save gabeborges/6528778 to your computer and use it in GitHub Desktop.
GIT CONFIG:
$git config --global user.name “username”
$git config --global user.email exemple@email.com
#setup your Git User Account. You need to have a git account in order to do it
GENERATE SSH KEY:
https://help.github.com/articles/generating-ssh-keys
INITIALIZING:
$mkdir projectname
$cd projectname
#this creates a folder in your local machine
$git init
$git add *
or $git add README.md
#for those who don't want to add all the files in the beggining
$git commit -am "Initial Commit"
$git remote add origin git@github.com:username/projectname.git
#before you push your files you need to have the ssh key in your local machine in order to have permissions to do it
#you also have to create a "repository"
$git push -u origin master
WORKING WITH FORK AND UPDATE BRANCH
#fork the repository to your local
git clone git@github.com:cbgabe/projectname.git
#if there is already an update branch you can pull it
git checkout -b user-branchname master
git pull git://github.com/user/projectname.git branchname
#WORKING LOCAL WITHOUT INSTALLING A NEW RUBY VERSION
rm .ruby-version
#this will not commit it
git update-index --assume-unchanged .ruby-version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment