Closed rkoudsi closed 2 years ago
after completing #2, you can go on the command line and run git status
to see changes to the project (you will have to run this command after cd
ing into the project directory.
After seeing that a file x
has changed, you can add that file to the changes you want to push to the server using the git add
command. If the file is called dice_sim.py
, you can add it with the command git add dice_sim.py
Then you can tell git that you want to finalize this change. You can do that with git commit -m"put a meaningful message here"
. Make sure the message makes sense and describes what changed and why it has changed. The message should be short like less than a sentence.
After you've committed youre changes, let the server know about these changes. You can do this with the command git push
. This pushes all your changes to the server so that others can see them.
its asking for a password for me to push changes to the server.
Set up your ssh keys to connect your computer to GitHub. This link can give you some helpful tips. You want to skip the section that has stuff about a hardware security key. Also when you are creating a key and it asks for an optional passphrase, I would leave it empty so that it makes it easier for you to use in the future.
Note that this is not something done often. You do this once ever for every new computer you use. Once you set this up on your computer, you'll be able to work on any project (not just this one).
Heard you're having trouble with the keys. This comment may help a bit.
Open terminal and run cat ~/.ssh/id_rsa.pub
. If it says no such file then go to the section on creating a key. If it prints out some wild code then go to the section for adding your key to GItHub.
Note: Don't follow this section if you already have a key.
ssh-keygen
. cat ~/.ssh/id_rsa.pub
cat
will show the contents of the file
add, commit, and push the change to the server