Skip to content

Instantly share code, notes, and snippets.

@Jbot29
Created February 9, 2016 15:41
Show Gist options
  • Save Jbot29/439fd133b8246ec45f9f to your computer and use it in GitHub Desktop.
Save Jbot29/439fd133b8246ec45f9f to your computer and use it in GitHub Desktop.
Starting Git Example
#Create a new directory
mkdir test
#cd into that new directory
cd test
#look for all files including hidden
ls -la
#run git init
git init
#you should now see .git directory
ls -la
#create a new file
touch project.txt
#git status, shows what is in staging and what is untracked
git status
#project.txt is untracked, so we need to track it and put into staging, by using git add
git add project.txt
#see the changed status
git status
#now lets commit all our new changes, the flag -m says I want to add a message, if you don't use the -m it will start
#an editor for the message.
git commit -m 'this is the message for the commit'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment