您的位置:首页 > 编程语言

如何使用github和tower

2011-09-22 16:06 1266 查看
1,使用github

第一步 在https://github.com/上注册一个账号

第二步 根据http://help.github.com/mac-set-up-git/在本地的bash(终端)进行相应设置

第三步 使用一下常见的指令

git remote add origin git@github.com:haiye1110/matt.git

git push -u origin master

git init--------建立仓库

git 命令 --help-----------查看帮助命令

touch filename

git status------查看状态

git add filename--------加入文件到临时的东东

git commit -m "add the file filename" -----commit到仓库中

git log------查看日志

echo "ddd" > filename ------修改filename(先清空)

git add filename

git commit -m "filename changed"

git diff 版本一 版本二--------比较不同

git reset 版本号--------返回到版本号

git revert 版本号--------撤销到版本号

git checkout filename------撤销当下没有git add的动作

git branch-------参看分支信息

git branch develop-----建立分支

git checkout develop-----切换分支

git merge develop------合并分支(将develop merge到master上,develop不变)

2. 使用tower(git的一种客户端工具mac os)

* open the software--tower
* click "Repositories/manage repositories"
* click "creat github repository"
* fill up "the project name" " description" "username"  "password(checkout <use API token…>)" then click "create"
* right click the master(HEAD) select "pull to"
* click "remote"select "origin",then fill "remote     branch"as"master"
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: