Skip to content

Instantly share code, notes, and snippets.

@gabeborges
Last active December 22, 2015 20:49
Show Gist options
  • 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 [email protected]
#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 [email protected]: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 [email protected]: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