-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgit-command.txt
31 lines (28 loc) · 1.07 KB
/
git-command.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
Configure Tooling----->
configure user information for all local repositories
$ git config --global user.name "[name]"
Sets the name you want attached to your commit transactions
$ git config --global user.email "[email address]"
Sets the email you want attached to your commit transactions
$ git config --global color.ui auto
Enables helpful colorization of commands line output
Create Repositories----->
Start a new repository or obtain one from an existing URL
$ git init [project-name]
Creates a new local repository with the specified name
$ git clone[url]
Downloads a project and its entire version history
Make Changes----->
Review edits and craft a commit transaction
$ git status
Lists all new or modified files to be committed
$ git diff
Shows file diffrences not yet staged
$ git add[file]
Snapshots the file in preparation for versioning
$ git diff --staged
Shows file differences between staging and the last file version
$ git reset[file]
Unstages the file, but preserve its contents
$ git commit -m "[descriptive message]"
Records file snapshots permanently in version history