sourcetree帮助文档
SourceTree可以在bookmarks界面跟蹤所有的git和mercurial項目。可以概覽工程中是否有需要提交的文件等。添加新的bookmark很簡單,可以通過兩種方式,通過本地的file sysytem或者clone url或者是創建新的
倉庫。
本地:就是在本地已經有了git項目,然后直接導入即可。可以找到需要的本地項目然后直接拖曳或者選擇“add working copy”絕對路徑搜索添加都可以找到.
?
clone url: 就是獲取有效的git項目url后選擇“clone repository”來下載工程到本地。
- The Toolbar
The repository window has a slightly different toolbar depending on whether you're looking at a Mercurial or Git repository:
The View Button
This button allows you to switch between the 3 main views of the repository: File Status, Log, and Search.
Commit
Opens the Commit dialog so you can commit your changes. In Git, if you're using staging, the default is to open the dialog with the commit of staged changes selected. In Mercurial, or Git with the staging view disabled, the dialog opens with either all pending files selected (if 0 or 1 file is selected in the File Status view, or you're on another view), or with specific files selected (if 2+ files are selected in the file status view).
提交代碼改動。
You can also commit specific files by using the context menu version of Commit from the File Status View, or by customising your toolbar to add the 'Commit Selected' button.
Update (Mercurial) / Checkout (Git)
Allows you to switch your local working copy to a different point in history. In Git, this will also move your HEAD (equivalent to git reset followed by git checkout).
checkout會切換不同的本地working copy
Revert (Mercurial) / Reset (Git)
Use this to undo changes in your working copy.
將在本地當前working copy代碼的修改還原
Shelve (Mercurial) / Stash (Git)
Moves any uncommitted changes you have in your working copy to a storage area, and returns your working copy to a clean state. A entry representing your stashed/shelved changes will appear on the sidebar once complete and you can bring these changes back into your working copy later from the sidebar context menu.
Add (或者選擇修改的文件然后右鍵單擊選擇 add to index)
Adds any selected untracked files to source control - the next commit will start to track these files.
這個功能是將選擇的未跟蹤文件加入到source control中的版本跟蹤控制中去
Remove
Stops tracking selected files and removes them from the working copy. The next commit will remove these files from being tracked in source control.
移除掉本地working copy中的選擇的文件使其不被跟蹤和控制
Add/Remove
A shortcut to stop tracking all files which are missing from the working folder, and to add any untracked files to source control. In Git, this also stages any modified files.
Fetch (Git only)
Download new commits from your remotes, but don't bring them in to your own branch yet.
這個會下載遠程最新的提交,但是不會更新到你自己的分支中去。這種情況有可能sourcetree的pull按鈕上面沒有顯示目前可以更新的提交,使用這個更進一步確認是否還有代碼需要更新
Pull
Download new commits from your remotes and bring them in to your current branch, either by merging or rebasing. This icon will show a number over the top of it if there are commits available on the remote for you to pull (updated periodically based on your Preferences).
下載最新的代碼更新到你當前的分支中去
Push
Upload new commits to a remote. This icon will have a number superimposed on it if you have commits which you haven't pushed yet.
上傳代碼,這個會彈出框體可能目前存在的多個可以提交的分支,注意只勾選需要提交的分支選項。
Branch
Create a new branch (also includes a tab for removing branches in Git)
創建新的分支
Merge
Merge changes into your current branch.
Tag
Create and manage tags.
Create Patch
Create a patch file either from your current uncommitted changes, or from one or more commits that you've already made.
Apply Patch
Apply a patch file either to your working copy or directly to the commit log.
Terminal
Open a Terminal at the selected location (this button may not be displayed in the default toolbar, right-click the toolbar to customise it if you wish to add it).
Settings
Access per-repository settings such as remotes.
提交過程如下:
1,選擇修改并需要提交的文件查看后右鍵點擊選擇add to index
2,創建新的分支
3,選擇commit將需要上傳的文件修改提交到本地
4,然后push,一定要注意去掉不需要提交本次修改的分支
5,到github網站對應項目下查看提交的分支然后pull即可
總結
以上是生活随笔為你收集整理的sourcetree帮助文档的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Windows下给SourceTree配
- 下一篇: svn cleanup failed–p