git常用命令

C:\Users\chipmunk\.gitconfig
修改全局用户名和密码

工程根目录下cd projectName/
$ git config --list

//修改密码,$可能不识别,直接修改C:\Users\chipmunk\.gitconfig
$ git config --global user.password "abc$123"   

$ git init

$ git add .

$ git commit -m '初始化项目'

$ git fetch origin

$ git branch

$ git remote -v

$ git remote add origin http://abcd.com/hello.git

$ git fetch origin

$ git branch -a

$ git push origin master 

//如果本地已有项目,要提交git,合并本地,强制提交
$ git pull origin master --allow-unrelated-histories

$ git push -u origin master -f

你可能感兴趣的:(git)