标签:ast 管理 origin git 命令 配置 org commit int
注册账号:
解压源码包
tar xjvf git-1.8.3.tar.bz2
编译
cd git-1.8.3 ./configure --prefix=/usr/local make
安装
sudo make install
请参见老左的博客Xcode连接git@osc中第一步至第四步。
打开命令行工具,执行命令:
cd gitOSChina/JBCalendar/ 进入项目的目录 git init 初始化本地库(仅第一次时需要) git remote add origin git@git.oschina.net:JustBen/jbcalendar.git 添加远程版本库的别名 git add . 添加所有文件到版本库 git commit -a -m "commit JBCalendar" 添加所有修改该版本库 git pull origin master 从远程库获取并合并到本地库 git push origin master 将修改推送到远程库
类似于创建项目时的操作,打开命令行工具,执行命令
cd gitOSChina/JBCalendar/ 进入项目的目录 git add . 添加所有文件到版本库 git commit -a -m "commit JBCalendar" 添加所有修改该版本库 git pull origin master 从远程库获取并合并到本地库 git push origin master 将修改推送到远程库
1. 错误:
git pull origin master ssh: Could not resolve hostname git.oschina.net:JustBen: nodename nor servname provided, or not known fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
解决方法:
重新设置SSH
cd cd ~/.ssh/ ssh-keygen Generating public/private rsa key pair. Enter file in which to save the key (/Users/yongbin/.ssh/id_rsa): /Users/yongbin/.ssh/id_rsa already exists. Overwrite (y/n)? y Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /Users/yongbin/.ssh/id_rsa. Your public key has been saved in /Users/yongbin/.ssh/id_rsa.pub. The key fingerprint is: f8:87:a4:25:37:7c:bf:64:b1:4f:d5:e1:27:74:18:9e yongbin@YongbinZhang.local The key‘s randomart image is: +--[ RSA 2048]----+ | . | | . + | | E..| | o ...o| | o S . . ..+| | B + . o o.| | . o . = . | | . o + | | . . | +-----------------+ cat id_rsa.pub | pbcopy 在git.oschina.net中添加一个SSH,直接复制到里面即可 cd ~/OSChina/JBCalendar/ 进入工程目录 git add . git commit -a -m "xxxxxxxxxxxxxx" git pull origin master git push origin master
标签:ast 管理 origin git 命令 配置 org commit int
原文地址:http://www.cnblogs.com/XYQ-208910/p/6053740.html