如何使用github和tower
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"

浙公网安备 33010602011771号