博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
【Git+Source Tree使用教程之一】commit & push
阅读量:4197 次
发布时间:2019-05-26

本文共 1084 字,大约阅读时间需要 3 分钟。

About SourceTree

 is a powerful Git and Mercurial desktop client for developers on Mac or Windows. In this tutorial, we're using OSX 10.9.5 and SourceTree 2.0.4.

AboutSourceTree2.png
 




GitHub

Here is our GitHub repository.

bogo-stree-repo.png
 




Cloning from GitHub

Let's clone the repo:

CloneFromURL.png
 


SourceTreeCloneRepoDialog.png
 


SourceTreeGitMasterBranch.png


Staged & Unstaged

If we make a new file on our local machine, we'll have "Uncommited" changes:

uncommittedChanges.png
 

We can put the file into staging either by checking "Unstaged files" or:

StagingFileMethod2.png
 

StagingMyfile01.png
 




commit to a local repo

Now commit the file in the staging area:

Working_myfile01_just_before_commit.png
 

If we press "Commit" on the top menu, we get the following:

Committing_myfile01.png
 

Fill in out comment, and the hit "Commit" button:

AfterCommitMyfile01.png

Now, we can see our local repo is 1 ahead of remote repo (origin/master) 

pushing to GitHub

After adding two more files to our local repo, we want to push to a remote repo:

TheFilesInLocalRepo.png
 

Before we do Push, we need to Pull first, so hit the Pull on the top menu:

PullingBeforePush.png
 

Now, press "Push" on the top menu:

Push3Button.png
 

PushDialog.png
 

AfterPush.png
 

As we can see, now our local and remote repositories are in sync!

In_Sync.png
 




GitHub after the push

After our push, the GitHub looks like this:

GitHubAfterPush.png




Source Tree Preferences

In this tutorial, we used the preferences as shown below:

SourcePreferencesGeneral.png
 

SourceTreePreferencesNetwork.png
 




原文链接:
你可能感兴趣的文章
LoadRunner的VS.NET 2005插件
查看>>
LoadRunner中如何验证下载的文件大小、统计下载时间、度量下载速度?
查看>>
LoadRunner脚本评审Checklist
查看>>
在LoadRunner中设置HTTP请求time-out的时间
查看>>
在LoadRunner脚本中实现随机ThinkTime
查看>>
LoadRunner9.51中文帮助手册
查看>>
RPT录制问题
查看>>
RPT8.0
查看>>
RPT8.1新特性
查看>>
LoadRunner测试AJAX
查看>>
LoadRunner测试GWT
查看>>
负载测试项目成功的5个关键要素
查看>>
LoadRunner性能测试培训大纲
查看>>
LoadRunner测试J2ME的Socket程序
查看>>
《QTP自动化测试实践》要出第二版了!
查看>>
用LoadRunner开发开心网外挂
查看>>
QTP测试.NET控件CheckedListBox
查看>>
使用QTP的.NET插件扩展技术测试ComponentOne的ToolBar控件
查看>>
用上帝之眼进行自动化测试
查看>>
为LoadRunner写一个lr_save_float函数
查看>>