git命令

来源:互联网 发布:php 钩子作用 编辑:程序博客网 时间:2024/06/06 12:24




git 提交出现这个错误fatal: Unable to create ‘project_path/.git/index.lock’: File exists. exists


解决办法
rm -f ./.Git/index.lock


on Windows


del .git\index.lock






git config --global user.name "Sa7en"


git config --global user.email "1055466040@qq.com"


git init 


git add .  (添加帮助文件)
git commit -m "注释内容” (添加注释)
5、连接远程仓库
git remote add origin https://git.oschina.net/Sa7en/Emall  (你的远程仓库地址地址) 


git pull  失败了 $ git config branch.master.remote origin  
                 $ git config branch.master.merge refs/heads/master  
git pull origin master


git push origin master 










$ git push -u origin mastergit
error: src refspec mastergit does not match any.
error: failed to push some refs to 'https://git.oschina.net/Sa7en/Emall'


action 无法调用接口的方法






git remote add origin https://git.oschina.net/Sa7en/Emall


 cd Users/X/Desktop/22385070discuz_ucenter_api_for_java/Emall
附上自己初学git 的一些命令
git clone https://git.oschina.Net/liukang325/test.git


cd test


git add *


git commit  (提交到本地)


git push origin master (提交到远程)


Username为oschina的用户名


Password为oschina的密码

原创粉丝点击