So I just started using git and github for some of my scripts and such (figured its time to get organized) and I learned for the first time how to actually use git properly. It’s pretty simple actually.

1) Create a repo on github. 2) Go to the folder where the code you intend to share is stored. Run the following: a) git init (initialize this directory as a git repo) b) git add . -A (use only when committing for the first time where you are sending all your files to github, subsequently, use "git add ") c) git commit -m 'First commit yay' (submits your first commit locally, not pushed remotely until step e) d) git remote add origin (tells git to associate your github repo with this directory) e) git push origin master (actually pushes your commit to github)

Thats it!! Now in the future, lets say you make a change to the readme, do the following:

1) git add 2) git commit -m 'added future enhancements' 3) git push origin master (remember, this pushes it to github where it will be public)


For more on this, is a great help. Now view my repo!!

Blog Logo

Mario Loria




Because gets old after a while.

Back to Overview