Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
sep:internal:personalbackup [2019/01/28 22:32]
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" to verify that myfile1.txt was added and ready to be committed, whereas myfile2.txt remains untracked. Here myfile1.txt represents files and folders suitable for being backup, such as source codes, makefiles and possibly parameters files. On the contrary, myfile2.txt represents all that you should not incorporate into the backup, such as binaries, results, etc.+  * You can type "git status" to verify that myfile1.txt was added and ready to be committed, whereas myfile2.txt remains untracked. Here myfile1.txt represents files and folders suitable for being backed up, such as source codes, makefiles and possibly parameters files. On the contrary, myfile2.txt represents all that you should not incorporate into the backup, such as binaries, results, etc.
    
 +
 ====  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 "-m" which allows to write a message or comment associated to the backup. I strongly recommend you to take advantage of this, for it is easy to lose track of the changes that one makes in one's codes. If you are constantly changing you code, either debugging or testing, it can be wise to commit, for instance, before any "major surgery" that you are palling in your codes, commenting the current status and what you are about to do.+  * Notice that I have added label "-m" which allows to write a message or comment associated to the backup. I strongly recommend you to take advantage of this, for it is easy to lose track of the changes that one makes in one's codes. If you are constantly changing your code, either debugging or testing, it can be wise to commit, for instance, before any "major surgery" that you are palling in your codes, commenting the current status and what you are about to do.
  
 ====  4. Create remote repository (you make this only once)==== ====  4. Create remote repository (you make this only once)====
Line 42: Line 45:
  
          git push          git push
-          + 
-  * If you get no error message, congratulations! Your commits went to the remote repository+  * If you get no error message, congratulations! Your commits went to the remote repository.
  
  
sep/internal/personalbackup.1548714734.txt.gz · Last modified: 2019/01/28 22:32 by cabrales
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0