Aymsep / test__

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

//Git version git --version

//git config git config --global user.email = "" git config --global user.password = ""

// git starting a project

1 . mkdir 1 . cd 1 . git init initial-branch = || git init -b 1 . git status

On branch main

No commits yet

nothing to commit (create/copy files and use "git add" to track)

1 . ls -a

//Git Help git --help

// Basic Git commands 1 . git status The first and most commonly used Git command is git status. You've already used it once, in the preceding exercise, to see that you had initialized your Git repo properly.

git status displays the state of the working tree (and of the staging area—we'll talk more about the staging area soon). It lets you see which changes are currently being tracked by Git, so you can decide whether you want to ask Git to take another snapshot.

2 . git add git add is the command you use to tell Git to start keeping track of changes in certain files.

The technical term is staging these changes. You'll use git add to stage changes to prepare for a commit. All changes in files that have been added but not yet committed are stored in the staging area.

3 . git commit After you've staged some changes for commit, you can save your work to a snapshot by invoking the git commit command.

Commit is both a verb and a noun. It has essentially the same meaning as when you commit to a plan or commit a change to a database. As a verb, committing changes means you put a copy (of the file, directory, or other "stuff") in the repository as a new version. As a noun, a commit is the small chunk of data that gives the changes you committed a unique identity. The data that's saved in a commit includes the author's name and e-mail address, the date, comments about what you did (and why), an optional digital signature, and the unique identifier of the preceding commit.

4 . git log The git log command allows you to see information about previous commits. Each commit has a message attached to it (a commit message), and the git log command prints information about the most recent commits, like their time stamp, the author, and a commit message. This command helps you keep track of what you've been doing and what changes have been saved.

5 . git --help

6 . git clone is used to create a copy or clone of remote repositories. You pass git clone a repository URL. Git supports a few different network protocols and corresponding URL formats. In this example, we'll be using the Git SSH protocol. Git SSH URLs follow a template of: git@HOSTNAME:USERNAME/REPONAME.git

7 . git diff

8 . git stash // git stash pop // git stash -u // git stash show // git stash show -p

// .gitignore

*.log , debug?.log , debug[0-9].log

// git clean -n / git clean -f

// git revert

// git reset --hard

// Collaboration

//git fetch

About


Languages

Language:HTML 100.0%