This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Last revision Both sides next revision | ||
github [2022/03/01 18:51] pwolinsk |
github [2022/03/01 19:31] pwolinsk |
||
---|---|---|---|
Line 17: | Line 17: | ||
The following example shows step by step how to use git to keep track of changes made to your personal project on Pinnacle. | The following example shows step by step how to use git to keep track of changes made to your personal project on Pinnacle. | ||
- | **1.** create a new project directory and initialize its management with git. | + | **1.** create a new project directory and initialize its management with git. ('' |
< | < | ||
Line 39: | Line 39: | ||
</ | </ | ||
- | **3.** add new files to the index (list) of files managed with git | + | **3.** add new files to the index (list) of files managed with git. ('' |
< | < | ||
pinnacle-l1: | pinnacle-l1: | ||
Line 51: | Line 51: | ||
# file1 | # file1 | ||
# file2 | # file2 | ||
- | nothing added to commit but untracked files present (use "git add" to track) | + | nothing added to commit but untracked files present (use "git add < |
pinnacle-l1: | pinnacle-l1: | ||
pinnacle-l1: | pinnacle-l1: | ||
Line 68: | Line 68: | ||
</ | </ | ||
- | **4.** create a snapshot of the current state of all files tracked by git in the project directory | + | **4.** create a snapshot of the current state of all files tracked by git in the project directory. ('' |
< | < | ||
pinnacle-l1: | pinnacle-l1: | ||
Line 81: | Line 81: | ||
</ | </ | ||
- | **5.** modify file1 and file2 and create another snapshot of the current version of files. | + | **5.** modify file1 and file2 and create another snapshot of the current version of files. |
< | < | ||
pinnacle-l1: | pinnacle-l1: | ||
Line 91: | Line 91: | ||
</ | </ | ||
- | **6.** review a history of commits (versions) | + | **6.** review a history of commits. ('' |
< | < | ||
pinnacle-l1: | pinnacle-l1: | ||
Line 113: | Line 113: | ||
pinnacle-l1: | pinnacle-l1: | ||
</ | </ | ||
+ | |||
+ | **7.** Revert to a previous version of the files. | ||
+ | < | ||
+ | pinnacle-l1: | ||
+ | Some text in file1 | ||
+ | line 2 | ||
+ | pinnacle-l1: | ||
+ | More text in file 2. | ||
+ | line 2 again | ||
+ | pinnacle-l1: | ||
+ | HEAD is now at cd7ebfa added initial text to file 2 | ||
+ | pinnacle-l1: | ||
+ | Some text in file1 | ||
+ | pinnacle-l1: | ||
+ | More text in file 2. | ||
+ | pinnacle-l1: | ||
+ | </ | ||
+ | |||
===== GitHub ===== | ===== GitHub ===== | ||