File tree Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change 26
26
` git status `
27
27
28
28
1 . Use whichever or these four options is appropriate to add the necessary files to git tracking:
29
- ` git add . `
30
- ` git add <filepath> `
31
- ` git add <directorypath> `
32
- ` git add -A `
29
+ ` git add . ` # Add file changes in current directory and below to staging.
30
+ ` git add <filepath> ` # Add a specific filepath to staging.
31
+ ` git add <directorypath> ` # Add a specific directory path to staging.
32
+ ` git add -A ` # Add all file changes in whole repository to staging.
33
33
34
34
1 . Use ` git status ` to view what files and directories will be added to the commit:
35
35
` git status `
71
71
## Switch between in-progress branches.
72
72
73
73
1 . Git ` add ` and ` commit ` changes to current branch:
74
- 1 . ` git add -A `
74
+ 1 . Use whichever ` git add ` option as appropriate:
75
+ * ` git add . `
76
+ * ` git add <filepath> `
77
+ * ` git add <directorypath> `
78
+ * ` git add -A `
75
79
1 . ` git commit -m <commit message> `
76
80
77
81
1 . Checkout the different branch we want to work on:
80
84
1 . Do the code changes for this branch.
81
85
82
86
1 . Git ` add ` and ` commit ` changes to the new current branch ` <a-branch-name> ` :
83
- 1 . ` git add -A `
87
+ 1 . Use whichever ` git add ` option as appropriate:
88
+ * ` git add . `
89
+ * ` git add <filepath> `
90
+ * ` git add <directorypath> `
91
+ * ` git add -A `
84
92
1 . ` git commit -m <commit message> `
85
93
86
94
1 . Checkout some other branch we want to work on:
You can’t perform that action at this time.
0 commit comments