Pushing to GitHub

GitHub

At Rails Girls Brisbane we created a little app and at the end of the day pushed it up to GitHub.

Because I am sure I will need to do this a lot (for example, right now, as I have just bought a new laptop and I want to get all my stuff off of this old one), I have decided to write down the notes I took from Rails Girls, to make sure I remember the process.

Ok, so

Pushing to GitHub

Step 1 – Navigate to the appropriate directory in your terminal, so that you will be pushing up the right files.

Step 2 – Make a new empty git repository by typing this into Terminal
$ git init .

Step 3 – Add all files
$ git add .

Step 4 – Check status of all those files
$ git status

Step 5 – Commit and Describe your changes
$ git commit -m"Write whatever message here to describe the changes you made"

Step 6 – Create new repository in GitHub
Go to Github, click on new repository, then copy the http URI

Step 7 -
$ git remote add origin https://whateverthaturlyoucopiedwas

Step 8 – Push up to GitHub
$ git push origin master

When making changes in the future, you can just go

$ git add .
$ git commit
$ git push

Leave a reply