-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtodo_git_commands.txt
66 lines (53 loc) · 1.44 KB
/
todo_git_commands.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
56
57
58
59
60
61
62
63
64
65
66
//TODO Git Commands
//Configure
man git-config
git config --global user.name "John Doe"
git config --global user.email [email protected]
git config --list
//In you own repo
//Create a sample repo
cd meusprojetos
mkdir dojogitgdgmanaus
cd dojogitgdgmanaus
man git-init
git init
git status
create file.txt
git add file.txt
git status
git commit -m "Meu primeiro commit."
create file2.txt
git add *.txt
git commit -m "Todos arquivos txt."
git log
git remote add origin https://github.com/<your user>/dojogitgdgmanaus.git
create repo at github.com
git pull origin master
git push -u origin master
//Change my repo
change code
git diff
git status
git add myfilechanged.txt
git commit -m "Alterei meu arquivo para fazer ... porque ..."
git push -u origin master
//Working in a Team, same file
cd meusprojetos
git clone https://github.com/gdgmanaus/GitDojo.git GitDojo
change file README.md (include some comment about this event)
git add README.md
git pull origin master
git commit -m "Include my comment about this event"
git push origin master
//Working in a Team, diferent file
create file <githubusername>.txt (write some crazy idea to make Manaus a better City to live)
git add <githubusername>.txt
git pull origin master
git commit -m "Inclui <githubusername>.txt"
git push -u origin master
git status
//Github with Android Studio
//Review
https://try.github.io/levels/1/challenges/1
//Go further with Branches
http://pcottle.github.io/learnGitBranching/