GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gitHelp/git操作.txt at master · Roy419/gitHelp

Expand file tree

/

git操作.txt

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
93 lines (51 loc) · 1.85 KB
/

git操作.txt

Copy path

File metadata and controls

93 lines (51 loc) · 1.85 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
输入个人信息(代码提交者)
git config --global user.name "xxxx"
git config --global user.email [email protected]
rm -rf .idea 删除文件
$ git commit -m "aa" 提交文件
git branch 查看分支
git checkout -b cly2018 创建并切换分支
查看本地和远程分支
git branch -a
查看所有远程分支
git branch -r
 使用Git下载指定分支命令为:git clone -b 分支名仓库地址
 使用Git下载v.2.8.1分支代码,使用命令:git clone -b v2.8.1 https://git.oschina.net/oschina/android-app.git
$ git reset --hard HEAD 本地做了修改然后直接删除 再去服务器拉去新的代码
git checkout -- AppServer/.project 恢复指定位置文件
1.使用git命令拉取分支代码
命令:git clone -b develop XXX
其中develop就是分支的名称 xxx是clone的主干
把本地分支提交给远程服务器
git push origin cly2018 cly2018是本地分支名称
查看分支:git branch
创建分支:git branch <name>
切换分支:git checkout <name>
创建+切换分支:git checkout -b <name>
合并某分支到当前分支:git merge <name>
删除分支:git branch -d <name>
查看克隆地址 git remote -v
git 无法忽略Android Studio 生成的 .idea目录解决办法
git rm -rf --cached .idea
其中.idea是我想删除的文件夹,所以用了rm -rf命令,如果你想删除的是文件,则用rm就行,慎用rm -rf!!!!
git push --set-upstream origin dev(dev表示的是你本地 分支仓库的名称)这个命令就好了。推送本地创建好的分支到远程分支
https://www.cnblogs.com/ydxblog/p/7988317.html
git 删除 远程tag分支
git push origin tag -d tagName
git 删除 本地tag分支
git tag -d tagname
#tag
1.列出所有tag
git tag
2.列出远程所有tag,注意git版本1.7(包括1.7)一下后边需要加上git仓库地址
git ls-remote --tags
3.创建一个tag
git tag [-a] tagname
4.创建一个加描述的tag
git tag -a tagname [-m <msg>]
5.删除本地tag
git tag -d tagname
6.删除远程tag
git push origin --delete tag tagname
7.删除远程tag,与6不同的是,这是推送一个空的tag覆盖掉原来的tag,以达到删除tag的目的
git push origin :refs/tags/<tagname>
You are visitor 01402860 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.