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 https://github.com/username/reponame.git (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 README.md 2) git commit -m 'added future enhancements' 3) git push origin master (remember, this pushes it to github where it will be public)

YAY!!!

For more on this, https://help.github.com/articles/create-a-repo is a great help. Now view my repo!! https://github.com/InAnimaTe

Blog Logo

Mario Loria


Published

Image

./scriptthe.net

Because 127.0.0.1 gets old after a while.

Back to Overview