Home Backend Development Python Tutorial github配置使用指南

github配置使用指南

Jun 10, 2016 pm 03:18 PM
github

1.建立项目,进入项目文件夹

2.初始化ssh key 参见官网指南.(本机生成一对key,public key传到官网sshkey下面)
https://help.github.com/articles/generating-ssh-keys/
3.初始化用户名,邮箱

$ git config --global user.name "defnngj"//给自己起个用户名
$ git config --global user.email "defnngj@gmail.com"//填写自己的邮箱

4.git init

5.git add .

6.git commit -m "message for this commit"

7.touch README.md

8.git add README.md

9.git status

10.去github网站建立一个repo 如"ts.git"

11.git remote add origin git@github.com:wuzhuzhu/ts.git
如果遇到了fatal: remote origin already exists.输入:

git remote rm origin

12.git remote add origin git@github.com:wuzhuzhu/ts.git

13.git push -u origin master

Counting objects: 19, done.
Compressing objects: 100% (16/16), done.
Writing objects: 100% (19/19), 4.54 KiB, done.
Total 19 (delta 1), reused 0 (delta 0)
To git@github.com:wuzhuzhu/ts.git
[new branch] master -> master
Branch master set up to track remote branch master from origin.

14.拉取git文档:
在远程主机上:

git remote add origin git@github.com:wuzhuzhu/ts.git
git pull origin master
遇见的问题:

windows 客户端是渣...还是要用git shell 要不连创建repo都总是网络报错 远程服务器要搞定ssh key... git
remote add origin git@github.com:wuzhuzhu/ts.git
是指制定origin到这个git网址,不要重复绑定.

以上就是个人简化版的github配置了,抛砖引玉,给小伙伴们参考下

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

GitHub project sharing: 10 open source online games that can be played with just one click GitHub project sharing: 10 open source online games that can be played with just one click Mar 24, 2023 pm 07:15 PM

GitHub project sharing: 10 open source online games that can be played with just one click

what is github what is github Mar 24, 2023 pm 05:46 PM

what is github

[Summary] Some reasons and solutions that may cause GitHub to not open [Summary] Some reasons and solutions that may cause GitHub to not open Mar 27, 2023 am 11:33 AM

[Summary] Some reasons and solutions that may cause GitHub to not open

Let's talk about how to upload projects and text documents in github Let's talk about how to upload projects and text documents in github Mar 27, 2023 am 10:53 AM

Let's talk about how to upload projects and text documents in github

Let's talk about how to set up a protected branch and submit a PR in Gitlab Let's talk about how to set up a protected branch and submit a PR in Gitlab Mar 30, 2023 pm 09:01 PM

Let's talk about how to set up a protected branch and submit a PR in Gitlab

How to download only the contents of one folder in github How to download only the contents of one folder in github Mar 27, 2023 am 10:53 AM

How to download only the contents of one folder in github

[Organization and sharing] 7 interesting and practical open source GitHub projects [Organization and sharing] 7 interesting and practical open source GitHub projects Nov 30, 2022 pm 06:18 PM

[Organization and sharing] 7 interesting and practical open source GitHub projects

Detailed explanation of the steps to deploy Github projects to the server Detailed explanation of the steps to deploy Github projects to the server Mar 27, 2023 am 10:53 AM

Detailed explanation of the steps to deploy Github projects to the server

See all articles