I have worked with git here and there but unfortunately it has never fully clicked with me. I want to use it now so that I can share my code with others later.
I have managed to create a new (remote?) repository on git. I then created a folder on my computer (with my code inside) and linked it to my repository and staged and pushed my files and everything worked correctly...
To clarify, I used this tutorial: http://product.hubspot.com/blog/git-and-github-tutorial-for-beginners
Then I closed my Terminal window and my system still "remembers" my remote repository git remote add --track master origin [url-to-git-repo]
but the local folder where my code is stored as been forgotten. Instead git sees my entire user folder - instead of the designated folder within.
So my question is, for a really basic user (who doesn't even necessarily want to build side branches and merge them or do any team editing),
How do I reconnect my local folder to my repository to pick up where I left off (with each new terminal use)?
Afterwards I can run a status check to see which files were updated, but how do I then make sure that they are pushing correctly? I am not sure of how to correctly set up the "ignore" files, so up until now I have been using the git push -a origin master
command.
(Whatever I have been doing seems not to be very consistent although I think that I am using the same commands each time...) I know this question seems simple, but it seems like every "connection" instruction involves creating a new repository $ git clone [url]
and new files $ git init [project-name]
, and that is not something that I want to do.
Thank you in advance for your help.