... | @@ -215,11 +215,31 @@ Let's create a file in your git folder and see how this change is shown in git. |
... | @@ -215,11 +215,31 @@ Let's create a file in your git folder and see how this change is shown in git. |
|
|
|
|
|
In this message you will also see a summary of changes. You should see both "fred.txt" and "java.txt".
|
|
In this message you will also see a summary of changes. You should see both "fred.txt" and "java.txt".
|
|
|
|
|
|
|
|
Once you have saved your message, you should see something like this:
|
|
|
|
````
|
|
|
|
[master 6b46d28] Added Fred and Java to fix bug 33
|
|
|
|
2 files changed, 0 insertions(+), 0 deletions(-)
|
|
|
|
create mode 100644 fred.txt
|
|
|
|
create mode 100644 java.txt
|
|
|
|
````
|
|
|
|
This means your changes have been successfully committed! However, they are not on the server yet.
|
|
#### Sending code back into GitLab
|
|
#### Sending code back into GitLab
|
|
[TODO]
|
|
Now that we have added a commit, we need to send those changes back into GitLab.
|
|
|
|
1. Back in your terminal, "cd" into your project directory.
|
|
|
|
2. Type `git push`.
|
|
|
|
3. You should be prompted for your SSH key password. Enter this and hit "Enter". If all goes well, you should see something like the below.
|
|
|
|
````
|
|
|
|
Counting objects: 3, done.
|
|
|
|
Delta compression using up to 4 threads.
|
|
|
|
Compressing objects: 100% (2/2), done.
|
|
|
|
Writing objects: 100% (3/3), 437 bytes | 437.00 KiB/s, done.
|
|
|
|
Total 3 (delta 0), reused 1 (delta 0)
|
|
|
|
To git.cs.sun.ac.za:slug/netbot.git
|
|
|
|
715fe21..6b6d123 master -> master
|
|
|
|
````
|
|
|
|
|
|
|
|
Congratulations! You have added your local changes to the server. Feel free to click around in the browser to see what this looks like.
|
|
|
|
|
|
All commands need to be executed within the directory of your git repo.
|
|
|
|
|
|
|
|
### Best practices for your own (and others) sanity
|
|
### Best practices for your own (and others) sanity
|
|
1. Add changes to your commit often.
|
|
1. Add changes to your commit often.
|
... | | ... | |