-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathgit.txt
executable file
·55 lines (48 loc) · 1.96 KB
/
git.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
52
53
54
55
What is a VCS?
A version control system is a software to manage a project by having all the different versions of your files saved
Some examples are git, mercurial (hg), subversion (svn)
What is git?
git is a VCS developed by Linus Torvalds for the development of the Linux Kernel, in 2005
What is a repository?
Basically another name for a project
A repository can have as many files/folders as you want
All git data is stored in repositories
git commands -
git config -- setting name and email
git init -- initializing a repository
make some files, add only some
git status (showing files unstaged, staged)
git diff (, git diff --cached)
What is a commit?
Basically like a save
Can also consider it a snapshot of various states in your git repository
Can by identified by its unique hash
Make a commit
Browse directory at previous commit
Git status at bash
git commit (Explain -a, -m flags)
(Create a few commits to get a small log to work on)
git log (Show some flags like --author, --committer, --oneline)
git show (git show to show current HEAD, git show <sha> to show a certain commit)
git revert
git reset
git checkout
Tell them about services like github, gitlab, etc.
Then make sure everyone has a github account, and show them how to create a repository and push
Then show them how they can view the log in the commits tab, check what a commit changed, etc.
How to edit and commit files online directly.
How to clone a repository from github or pull into an existing local repository
ksdfg:
make a repo online
what a remote is
Basically another name for a project
A repository can have multiple files
push repo on hub
add files, upload files
commit history, browse files at previous commit
pull repo onto bash
go to hub, make a branch, make some change
pull repo first, show no branch in git branch, then pull branch
go to github, start a pull request from branch
clone - bash guys: revert commit
fork me and make a pull request