mvn-quangtran-dn / GIT-PHP

0 stars 0 forks source link

G1-LeBaVy #10

Open mvn-vyle-dn opened 6 years ago

mvn-vyle-dn commented 6 years ago

git init

$ git init Create an empty Git repository or reinitialize an existing one

1

git clone

$ git@github.com:at-quangtran/GIT-PHP.git Clone a repository into a new directory

2

git branch

$ git branch List all branches

3

Tạo branch

$ git checkout new_branch Create a new branch

5

Delete branch

$ git branch -d new_branch Delete a branch

6

$ git checkout -b new_branch Create and switch a new branch

4

git add

$ git add index.html Add file contents to the index

7

git commit

$ git commit -m "commit lan 1" Add file contents to the index

8

git commit --amend

$ git commit --amend Amend commit message

9 10

git log

$ git log Show commit logs

11

git diff

$ git diff master develop Show changes between commits, commit and working tree, etc

12

$ git diff master:./index.html develop:./index.html

13 14

checkout 1 file

$ git checkout master -- index.html

15

git reset

$ git reset Reset current HEAD to the specified state

16

git revert

$ git checkout e72af7d Revert some existing commits

17

git log --oneline

$ git log --oneline Show commit logs in a single line

18

git fetch

$ git fetch origin vy Download objects and refs from another repository

19

git pull

$ git pull origin vy Fetch from and integrate with another repository or a local branch

21

git push

$ git push origin vy Update remote refs along with associated objects

22

tạo conflict

23

resovle conflict

25

26

mvn-quangtran-dn commented 6 years ago