Linux系统github使用
2013-06-25 13:54
176 查看
命令行下使用:
1.检查ssh key
如果提示"No such file or directory",则需要创建一个ssh key.
2.创建ssh key.
会有相应提示,按照提示操作:
工具装好后,将ssh key 拷贝到剪切板上
或者通过其他方式,正确的copy到github上进行设置.
4.将文件提交到本地git 仓库
如果已经有项目,则需要clone
5.同步本地仓库到远程,为远程仓库创建别名
同步
1.检查ssh key
cd ~/.ssh
如果提示"No such file or directory",则需要创建一个ssh key.
2.创建ssh key.
ssh-keygen -t rsa -C "your_email@example.com"
会有相应提示,按照提示操作:
# Creates a new ssh key, using the provided email as a label # Generating public/private rsa key pair. # Enter file in which to save the key (/home/you/.ssh/id_rsa): Enter passphrase (empty for no passphrase): [Type a passphrase] # Enter same passphrase again: [Type passphrase again]
Your identification has been saved in /home/you/.ssh/id_rsa. # Your public key has been saved in /home/you/.ssh/id_rsa.pub. # The key fingerprint is: # 01:0f:f4:3b:ca:85:d6:17:a1:7d:f0:68:9d:f0:a2:db your_email@example.com 3.将ssh key 设置到github上,install copy tool :
sudo apt-get install xclip
工具装好后,将ssh key 拷贝到剪切板上
xclip -sel clip < ~/.ssh/id_rsa.pub
或者通过其他方式,正确的copy到github上进行设置.
4.将文件提交到本地git 仓库
git add . git commit -m "version1.0"
如果已经有项目,则需要clone
git clone git@github.com:git_name/project_name.git
5.同步本地仓库到远程,为远程仓库创建别名
remote add project_name git@github.com:git_name/project_name.git
同步
git push -u project_name master
查看当前branch
git branch
The ending....
相关文章推荐
- 在Linux系统下使用Github的基本教程
- 在Linux系统下使用Github的基本教程
- GitHub的安装和使用(Windows、Linux系统上)
- Mac使用ssh登录远程linux系统查看jetty日志及同时使用github工具
- Linux系统上的任务计划相关命令at、crontab的使用方法
- Linux系统编程——I/O多路复用select、poll、epoll的区别使用
- 使用python获取CPU和内存信息的思路与实现(linux系统)
- Linux查看系统资料使用情况
- linux系统ioctl使用示例
- Linux下使用内存文件系统 ramdisk ramfs tempfs
- Linux使用NFS(网络文件系统)挂载网络磁盘
- 使用 Python 获取 Linux 系统信息的代码
- 几种Memcache的状态监控的工具,以及安装和使用【linux系统】
- 使用xshell工具密钥认证登录Linux系统
- Linux系统用户堡垒机使用手册
- Linux 内核使用register_filesystem添加自定义文件系统deanfs
- 使用 /proc 文件系统来访问 Linux 内核的内容
- windows和linux系统下数据传输工具——tftpd32使用说明
- 使用 /proc 文件系统来访问 Linux 内核的内容
- mac系统下使用Vmwear安装red hat linux