-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathzechu.txt
54 lines (34 loc) · 1.45 KB
/
zechu.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
Notes for git workshop by usdevs
====Section 1: Command Lines======
mkdir [dir name]: make new folder with name [dir name]
ls: displays a list of files and folder
touch [file.extension] : creates a new file with [name] and [extension]
cat [filename]: displays the contents of the file
pwd: print working directory: displays the path of the current working directory
(short cut) command L: deletes prev command line
=====
git config
only need to set up once
===== section 2: basic git
git init: initialised a new git repository
git add : add to staging area/tells git to start tracking a file
git commit -m "MESSAGE": commit changes to the repository (have to say message)
first thing to do for any git proj: git init
git status: checks the status of our working directory
git diff: shows whats modified, before added to staging area
git log: shows all the commits i have made
git log --oneline: shows us all the commits in oneline
======git summary======
basic git workflow:
1. change
2. stage (add)
3. finaize (commit)
========================
after commiting should see "working tree clean nothing to commit"
(everything you have now is in repository)
git log shows from newest to oldest (top to bot)
git checkout [identification no. of the commit]: allows you to go back to the first commit in history
git checkout master: goes to the latest version
========================
collab aspect of git:
fork: creates a copy of other ppl's stuff on my own repository