From 5b1d29022e21dae59bf1ee3c000cf30610e6a4fa Mon Sep 17 00:00:00 2001 From: Ken Schaefer Date: Thu, 13 Apr 2023 10:54:56 -0500 Subject: [PATCH] git document --- Git/git.md | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 Git/git.md diff --git a/Git/git.md b/Git/git.md new file mode 100644 index 0000000..6a87f27 --- /dev/null +++ b/Git/git.md @@ -0,0 +1,41 @@ +# GIT + +## Git basics + +### Configure global account information + +Important to identify who you are or git will not work. If you are using GitHub, Gitea or other remote service your email and name need to match your remote accounts - otherwise, you won't get your green blocks filled. + +You can also configure account information on a repo by repo basis by omitting the --global flag. + +``` +git config --global user.email "you@email.com" +git config --global user.name "Your Name" +``` + +### Init + +Initialize (e.g., create) a repository. This command will create a working directory under .git + +`git init` + +### Status + +Show the status of the local working directory (repo) + +`get status` + +### Add content to repo + +Must add files and folders to repo before they will be tracked. Can either add individual files, a list of files, or all files. + +`git add .` +`git add {list of filenames}` + +### Commit + +Use this command to commit your changes to the current working branch + +`git commit -m "initializing a repo"` + +