文件名称:
git命令和smartgit使用介绍.pdf
开发工具:
文件大小: 9mb
下载次数: 0
上传时间: 2019-08-24
详细说明:git命令和smartgit使用介绍.pdf,详细介绍了git命令和smartgit使用2. smart git基础
21从程序中启动 smart git
smartc
Project Edit View Remote Local Branch Query Changes
New window
Ctrl+N
open or Manage projects
Ctrlto rge Commit Stag
Close
Ctrl+F4
Clone
Ctrl+alt+o
Working Tree State
open Repository.
shift+ctrlto
Repository settings.
Alt+Enter
Remove Repository.
Exit
Alt+x
从工程 Project→> Open Repository如下
Open Repository
steps
ReposItory
Repository
Specify the Cit or Mercurial repository to open
Project
Repository!I/media/work/testing
Choose
s Back
Next≥
Finish
Cancel
选择 clone下来的gjt库的路径,点击next
点击 finish。
Open Repository
ceps
Project
positon
Specify where to open the newly cloned repository
o Project
Openin new project
Project Name:
o Open existing project
O Open in current project
Finish
Cancel
testing-SmartGit 30.5(for non-commercial use only
Project Edit view Remote Local Branch Query changes window Help
鳟p
Refresh Pull Sync Push Switch Merge Commit
Edit Onstage Remove Discard Dele
Directories 4
用es
a File Filter
a testing (master Name v Index State Working Tree State Relative Directory
D uida 3581
uidp3457
Pushable Commits [
Output耳
Commit Date Message Path
22查看log
Query->Open
testing-smartGit 3.0.5( for non-commercial use only)
Project Edit view Remote Local Branch Query Changes window Help
的;opgn
Refresh Pull sync Push switch Mer show Changes
Instage Remove Discard Dele
Compare Two files ShiFt+F4
Directories
ctrl
a File Filter
v f+ testing(master) Name v index stateLog
Ctrl+L Relative Directory
r maste
o uida 3681
D uidp345
Pushable commits(1)离
Output x
Commit Date Message Path
PM02:43
delete test1
1 Direct
1 to push
Commits
Q Filter
Default Coloring
Message
前工作分克
OAll branches
t o C)master delete test1
用三角号卖示
Master(working tree branch)
o origin/test11add file test11
other branches
o add file
己经ph到数据
ron/ mastertadd file库的程分支
点击可以选择查看所分支og
宝音 master分支o等
add file
加左边弹出框
o origin/uidp 3457 Update 6666
o Update 5555
o update test1
d file
o add file
o originuidp 3472Update 6666
o Update 5555
merge test1
update test
update test1
23选择分支
testing - Git 3.0.5(For non-com mercial use only
ProjectEdit View Remote Local Branch query changes Window Help-一位分
鱼鳟 Switch
LS
Refresh Pull sync Push swi Check out.
ndex Edit Onstage Remove
d pelet
Mer
Ctrl+M
Directories s
t Files 23
a File Filter
Ctrl+D
Relative Directory
Add Branch.
c mast
ter
a uida 3681
Add Tag
hifteF7
白uidp3457
Manager
Pushable Commits (1)x
ut s
Commit Date Message Path
Ready
I to push
创建分支( git branch uidp3457)
Add Branch
Add branch to current head commit
Enter the name of the local branch to
create
Branch: uidp34571
Add Branch Add Branch Switch Cancel
点击 add branch创建分支
点击 Add Branch& Switch创建分支并切换到创建的分支上。
Message
可以看到本地创
uidp 3457 add test1
建了一个
o (master delete testT
ud3457分支
評在本地做了
o origin/test11]add file test11次解坦文件的提
o add file
origin/ master Cadd file
add file
origin/uidp3457Update 6666
o Update 5555
o update test1
24推送Push
可 ecc aIt view Remote Locat bI ann Cuery Cnanges w"owne甲
雙「②
Refresh Pull Sync Push Switch Merge Commit Stage Index Edit Unstage
rectories E
Push
t testing (uidp345
Push local commits to the remote orig in repository
Select which local branch(es)should be pushed to L
ative
lo master
the origin repository.
t uida 3681
o uidp 3457
o Current branch uidp3457
O Allmatching"branches (already existing remotely
Push
Cancel
2.5拉取数据 git pull:
相当于是从远程获取最新版本并 merge到本地
Project Edit View Remote Local Branch Query Changes Window Help
Refresh Pull Sync Push Switch Merge Commit Stage Index Edit Unstage Remov
rectories x
Pull
fr testing (master
Pull commits from a remote repository
Select the remote repository and whether to merge/rebase
directory
e master
changes (pull or do not further process them('fetch)
o uida3681
B uidp3457 o Merge fetched remote changes
O Just fetch chane
Y Update registered Submodules
M And initialize new Submodules
Pull
Cancel
git fetch:相当于是从远程获取最新版本到本地,不会自动 merge
此命令会到远程仓库中拉取所有你本地仓库中还没有的数据。运行完成后,你就可以在本地访问该远程仓库
中的所有分支,将其中某个分支合并到本地,或者只是取出某个分支,一探究竞。(我们会在第三章详细讨论
关于分支的概念和操作。)
如果是克隆了一个仓库,此命令会自动将远程仓库归于 origin名下·所以, sit fetch origin会抓取从你上
次克隆以来别人上传到此远程仓库中的所有更新(或是上次 fetch以来别人提交的更新)。有一点很重要
需要记住, fetch命令只是将远端的数据拉到本地仓库,并不自动合并到当前工作分支,只有当你确实准备好
了,才能手工合并
如果设置了某个分支用于跟踪某个远端仓库的分支(参见下节及第三意的内容),可以使用gtp1命令
自动抓取数据下来,然后将远端分支自动合并到本地仓库中当前分支。在日常工作中我们经常这么用,既快
且好。实际上,獸认情况下 it clone命令本质上就是自动创建了本地的 master分支用于跟踪远程仓库中的
Taster分支(假设远程仓库确实有 master分支)·所以一殷我们运行gtp,目的都是要从原始克隆的远
端仓库中抓取数据后,合并到工作目录中当前分支
8
Projcct Edit View Remote Local Branch Query Changes window Help
Refresh Pull Sync Push Switch Merge Commit Stage index Edit Unstage Remove Discard Dele
iles 3
a File Filte
LE testing(master Name y Index state/working Tree state
Relative Directory
合并
a uida3681
uidp3457
存
Pushable com mits(1)嚣
outout 5x
Commit Date Message Path
S Fetch, merge and commit
PM02:43
delete test1
⊙ Switch Branch
9 Fetch
② Add Branch
26合并分支 merge
切换到合并分支上:
点击 Query>og
Message
o Merging ( not yet committed)
选择需要合井的分
)masterlupdate
支uic3457
add file test1
uidp3457/ test1
点击右健,选
mets
delete test1
o origin/test11 add file test11
o add file
origin/master Cadd file
dd file
Update 6666
Merge
How to merge from branch uidp 3457?
If there is no con flict, Git can automatically create a
merge commit. Alternatively, you can opt to merge just
in to the working tree and create the merge or normal
(squash)commit later.
Create Merge-Commit Merge to working TreeCancel
26文件各种状态
2.6.1 Modified in working tree
LII ELOI IEO E
l testing (uidp345Name
Ind
master
new
Uncha
a uida3681
ID newl
Uncha
uidp3457
i newdiffile Modil
B newfile
Unch
2.6.2 Modified in Index
a testing (uidp 345 Name Index State Working Trees
a master
口new
Unchanged Unchanged
白uida3681
new1
Unchanged Unchanged
D uidp3457
Fi newdiffile Modified As Index
L newfile
Unchanged Unchanged
M task2
Unchanged unchanged
(系统自动生成,下载前可以参看下载内容)
下载文件列表
相关说明
- 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
- 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度。
- 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
- 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
- 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
- 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.