Skip to content

Instantly share code, notes, and snippets.

@Delamare2112
Last active October 28, 2016 21:50
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 Delamare2112/6af4137aa964334337b565c67300cfa4 to your computer and use it in GitHub Desktop.
Save Delamare2112/6af4137aa964334337b565c67300cfa4 to your computer and use it in GitHub Desktop.

Git Going

Step 1: git installation

Download git from here: https://git-scm.com/

Feel free to change install settings as some are personal preferences. Like for example choosing whether or not you want git to add buttons to your Windows-right-click-a-file menu. Personally I always uncheck adding Git GUI to my menus because I never use it.

Also download https://git-lfs.github.com/

open Git Bash and type git lfs install

Step 2: ssh keys

open Git Bash and type ssh-keygen. Hitting enter will then cause it to ask where you want to put your ssh key. Hit enter again so that it puts it in the default location. Now it will ask to optionally set a password. Technically it is more secure to set one obviously but it does mean you will need to type that password literally every time you push new content and the added security of a password is very low in this case. Depending on your OS you may not see your password being typed if you choose to make one.

Step 3: Telling GitHub about your new key

Copy content of the newly made public key file at ~/.ssh/id_rsa.pub using notepad or whatever you'd like. In Windows you can get to the id_rsa.pub file by typeing the following path into your file browser: %HOMEPATH%\.ssh. If your not in Windows or just want to stay in Bash, cat ~/.ssh/id_rsa.pub will output the key to the screen and you can copy it from there.

After singing up/in to GitHub, go to https://github.com/settings/keys and add your key.

Now have someone add you as a member to the GitHub project or message me your GitHub username on Slack

Step 4: Getting a project setup:

  • IF Git Bash Here was enabled during your Git install:
  •      Browse to where you want the project to be in Windows, right click some white space, and click Git Bash Here
  • ELSE:
  •      Type cd in GitBash then click and drag the folder you want into Git Bash
  • END IF
  • git clone $SSHRUL where $SSHRUL is the SSH URL from the GitHub project page.
  • git submodule init
  • git submodule update
  • example SSH URL:git@github.com:Organization/Project.git

Step 5: Adding content:

  • git add -A . <- Adds files to staging area
  • git commit -m "Put Commit Message Here" <- Creates local commit from files in staging area
  • git pull origin master <- Grabs any new updates (Just in case)
  • Deal with conflicts if you have any
  • git push -u origin master <- Sends all local commits to server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment