Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
sep:internal:personalbackup [2019/01/28 22:23] cabrales |
sep:internal:personalbackup [2019/01/29 03:13] (current) milad |
||
---|---|---|---|
Line 8: | Line 8: | ||
=====Using Git===== | =====Using Git===== | ||
+ | |||
+ | * Git is a useful but quite a complex tool. This instructions do not pretend to be more than 1% exhaustive. Some people claim that, after 5 or more years using git they do not get a full grasp (do not look at me; I have spend a little bit less than two years!) Internet is your friend, so look there for answers when requiring something more complex than what I present in this tutorial (or make an appointment with Bob). | ||
==== 1. Creating a Git repository==== | ==== 1. Creating a Git repository==== | ||
Line 23: | Line 25: | ||
git add myfile1.txt | git add myfile1.txt | ||
- | * You can type "git status" | + | * You can type "git status" |
+ | |||
==== 3. Commit your changes==== | ==== 3. Commit your changes==== | ||
* Once you added the files, you create the local backup using git commit: | * Once you added the files, you create the local backup using git commit: | ||
Line 30: | Line 33: | ||
git commit -m "This is my backup" | git commit -m "This is my backup" | ||
- | * Notice that I have added label " | + | * Notice that I have added label " |
==== 4. Create remote repository (you make this only once)==== | ==== 4. Create remote repository (you make this only once)==== | ||
- | * The final step is to push the local repository to the server. However, you must first create the remote repository towards which you will push. Please take a look at this simple tutorial to learn how to create it: {{: | + | * The final step is to push the local repository to the server. However, you must first create the remote repository towards which you will push. Please take a look at this simple tutorial to learn how to create it: {{: |
Line 39: | Line 42: | ||
==== 5. Push to remote repository==== | ==== 5. Push to remote repository==== | ||
- | * The final step is to push the local repository to the server. | + | * The final step is to push the local repository to the server. |
+ | |||
+ | git push | ||
+ | * If you get no error message, congratulations! Your commits went to the remote repository. | ||