Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • Git Beginners Git Beginners
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 1
    • Issues 1
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Insights
    • Issue
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Computer-ScienceComputer-Science
  • Git BeginnersGit Beginners
  • Wiki
  • Home

Home · Changes

Page history
Update Home authored Jul 23, 2018 by Andrew James Collett's avatar Andrew James Collett
Hide whitespace changes
Inline Side-by-side
Home.md
View page @ cfa148fa
......@@ -214,12 +214,32 @@ Let's create a file in your git folder and see how this change is shown in git.
We commit these changes with the command `git commit`. Once you issue this command, you will be prompted with a text editor of your choice so that you can add a comment to this set of changes. [see here](#setup). Ask a demi to help you change editors if need be.
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
[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
1. Add changes to your commit often.
......
Clone repository
  • Home