git使用笔记

来源:互联网 发布:软件批量卸载 编辑:程序博客网 时间:2024/06/07 15:51

git gui

1、在远程创建库,得到一个远程仓库地址;

2、在本地项目根目录文件夹,右击->Git Init Here 创建本地仓库;

3、在本地项目根目录文件夹,右击->Git Gui,remote -> add,名字:projectname,location:https:~/projectname.git,点击Add;

4、remote -> fether;

5、扫描,缓存改动,提交;

6、上传 -> 勾选强制覆盖,点击上传;

7、OK,项目被上传至远程仓库了;

8、从远程克隆,修改,提交,上传;


git bash

1. create a local repo, assumming you have a project that is programing, git init at the root directory of the project; 

$git init

$git add -A

$git commit -m "a commit message"


2. upload it to remote repo, assumming you have a remote repo,https://git.~~~.com/path/gitname.git

$git remote add origin https://git.~~~.com/path/gitname.git (origin is a label)

$git fetch origin

$git merge origin/master

$git push origin master  

and then, hope you upload your project to a remote repo successfully!





0 0