Git Basics

https://slides.com/alidejong/git-basics

Ali de Jong

Senior, ECE

Innovation Team

alioup

Florian Janke

Sophomore, CS

Innovation Team

jaflo

git          !=           GitHub

  • Version Control
  • Commit History
  • Managing changes
  • Hosts code
  • Open Source Community
  • Collaboration and Sharing

Things You'll Need

  • Github Account
  • Text Editor
  • Unix terminal / Git Bash

Github Account

  • Make Account
    • https://github.com
  •  Submit Username
    • https://goo.gl/ap28FP

Text Editor

  • Any one will work! (Examples: Atom, Sublime)
  • Install Atom here
    • https://atom.io/

git Mac Install

$ brew install git

OR

http://git-scm.com/download/mac

 

$ git config --global user.name "username"

$ git config --global user.email "me@utexas.edu"

git Windows Install

http://git-scm.com/download/win

git Linux Install

$ sudo apt-get install git-all

$ git config --global user.name "username"

$ git config --global user.email "me@utexas.edu"

Now we're ready!

Make a Repository

Clone the Repository

 $ git clone https://github.com/alioup/workshop.git

Add Collaborators

Add Collaborators

Add Collaborators

Create a File

name: username.txt

content: Hello my name is Ali and my favorite emoji is 💃

 

Make a Commit

$ git status

$ git add username.txt

$ git status

$ git pull

$git push

 

Resolving a Merge Conflict

History

$ git log

 OR

Reset to prior Commit

$ git reset  COMMIT HASH --hard

Git Basics

By Ali de Jong

Git Basics

  • 136
Loading comments...

More from Ali de Jong