I have a repo on GitHub and I want to update it with changes made to the folder I pulled it from.
What are the steps, without jargon or short hand terms, a new Git user should do from the moment they cd directory
?
Including how to track the local changes made to any files and then how to send those changes and updates back to the remote repository.
The most simple flow is this:
# clone the repository (from github, for example)
git clone [email protected]:username/reponame.git
cd reponame
# edit some files
# add them to the index
git add file1.txt
git add file2.gif
# review your changes
git status
# commit the changes
git commit -m "Decription of my change"
# push them back to the remote repository
git push origin master
This is the basic flow that should get you going. However, there's lots of resources for learning the basics of git, I highly recommend you go over them. Getting started is really not that difficult as it seems.
You're working alone, I infer, so it is very simple.
1) is done by "git clone" through SSH. The github website will give you the clone URL.
2) Just work locally, that's what DVCS's are about :-)
And "git commit" what you develop.
3) You need to "git push" your branch to github. It will then be fetchable by other people.
These are the basics, when you will get confident with this simplest workflow, you can learn many stuff that will suit your coding practices nicely, rewrite your history and lots of nice git stuff.
And you will learn how to work with other people, merge, and rebase.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With