Skip to content

Commit 1b3f043

Browse files
committed
add git-command file
1 parent 88c2e86 commit 1b3f043

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

git-command.txt

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
git diff : �Ƚϵ��ǹ���Ŀ¼�е�ǰ�ļ����ݴ��������֮��IJ��죬���޸�֮��û���ݴ������ı仯���ݡ����鿴��δ�ݴ���ļ���������Щ���֣�
2+
3+
git diff --cached: �鿴���ݴ�Ľ�Ҫ���ӵ��´��ύ������ݡ�
4+
5+
git commit -a ������ʹ���ݴ�����ķ�ʽ���������Ѿ����ٹ����ļ��ݴ�һ��һ���ύ��
6+
7+
git rm:��Git���Ƴ�ij���ļ��������ݴ������Ƴ������ɾ��֮ǰ�޸Ĺ������Ѿ��ŵ��ݴ�����Ļ����ͱ���ʹ��ǿ��ɾ��ѡ�� -f����ȫ���ԣ����ڷ�ֹ��ɾ��û�����ӵ����յ����ݣ����������ݲ��ܱ�Git�ָ���
8+
��һ�������������Ҫ���ļ������ڴ��̣����Dz�����Git�������٣�������������.gitignore�ļ�ʱ����ʱʹ�ã� git rm --cached filename
9+
10+
git mv file_from file_to���������ļ�
11+
12+
git log �ᰴ�ύʱ���г����еĸ��£�����ĸ������������档 �������������ģ����������г�ÿ���ύ�� SHA-1 У��͡����ߵ����ֺ͵����ʼ���ַ���ύʱ���Լ��ύ˵����
13+
һ�����õ�ѡ���� -p��������ʾÿ���ύ�����ݲ��졣 ��Ҳ���Լ��� -2 ������ʾ��������ύ�� git log -p -2
14+
15+
git log --stat: ���Կ���ÿ���ύ�ļ��Ե�ͳ����Ϣ
16+
--pretty= online(short full fuller)
17+
git log --pretty=format: ������Ҫ��ʾ�ļ�¼��ʽ
18+
git log --pretty=format:"%h %s" --graph :�����չʾ��֧���ϲ���ʷ
19+
20+
git log --since=2.weeks��--author --grep-��
21+
-(n)������ʾ����� n ���ύ
22+
--since, --after������ʾָ��ʱ��֮����ύ��
23+
--until, --before������ʾָ��ʱ��֮ǰ���ύ��
24+
--author������ʾָ��������ص��ύ��
25+
--committer������ʾָ���ύ����ص��ύ��
26+
--grep�� ����ʾ��ָ���ؼ��ֵ��ύ
27+
-S�� ����ʾ���ӻ��Ƴ���ij���ؼ��ֵ��ύ
28+
29+
git commit --amend�� ���������ύ������ֻ����һ���ύ���ڶ����ύ�Ľ���������һ���ύ
30+
31+
git reset HEAD file: ȡ���ݴ�
32+
33+
git checkout -- file: ����֮ǰ�������޸ģ�Σ�����
34+
35+
36+
git remote:�г�ÿһ��Զ�̷������ļ�д -v������ʾ��дԶ�ֿ̲�ʹ�õ�Git����ļ�д�����Ӧ��URL
37+
38+
git remote add <shortname> <url>������һ���µ�Զ��GIT�ֿ⣬ͬʱָ��һ�������������õļ�д
39+
40+
git fetch [remote-name]:��ȡԶ�ֿ̲����е��DZ���û�е���Ϣ��ִ����ɺ��㽫��ӵ��Զ�ֿ̲������з�֧�����ã�������ʱ�ϲ���鿴��
41+
42+
�������һ����֧����Ϊ����һ��Զ�̷�֧������ʹ��git pull �������Զ���ץȡȻ��ϲ�Զ�̷�֧����ǰ��֧��
43+
44+
git push [remote-name] [branch-name]:����֧���͵�������
45+
git remote show [remote-name]:�鿴һ��Զ�ֿ̲�������Ϣ
46+
git remote rename:Զ�ֿ̲��������
47+
git remote rm [remote-name]:�Ƴ�һ��Զ�ֿ̲�
48+
49+
git tag���鿴��ǩ
50+
git show tagname�����Կ�����ǩ��Ϣ���Ӧ���ύ��Ϣ
51+
52+
git config --global alias.co checkout:Ϊcheckout��������һ������

0 commit comments

Comments
 (0)