版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u012292754/article/details/84641303
参考 http://www.worldhello.net/gotgithub/
1 安装 git
检查是否安装 SSH
tzb@XPS-15-9570 MINGW64 ~
$ cd ~/.ssh
bash: cd: /c/Users/tzb/.ssh: No such file or directory
创建新的 SSH keys
打开 https://github.com/settings/keys
,复制id_rsa.pub
的内容到新建的 SSH key
在本地设置 Git 信息,
2 测试(命令行初始化)
tzb@XPS-15-9570 MINGW64 /d/Data/GitHub/firstGit
$ git init
Initialized empty Git repository in D:/Data/GitHub/firstGit/.git/
tzb@XPS-15-9570 MINGW64 /d/Data/GitHub/firstGit (master)
$ git add *
tzb@XPS-15-9570 MINGW64 /d/Data/GitHub/firstGit (master)
$ git commit -m "test Git"
[master (root-commit) c4e2533] test Git
3 files changed, 3 insertions(+)
create mode 100644 dir/text2.txt
create mode 100644 dir/text3.txt
create mode 100644 test1.txt
tzb@XPS-15-9570 MINGW64 /d/Data/GitHub/firstGit (master)
$ git remote add origin [email protected]:LoneSurvivor1993/testGit.git
tzb@XPS-15-9570 MINGW64 /d/Data/GitHub/firstGit (master)
$ git push -u origin master
Warning: Permanently added the RSA host key for IP address '13.250.177.223' to t he list of known hosts.
Enter passphrase for key '/c/Users/tzb/.ssh/id_rsa':
Enumerating objects: 6, done.
Counting objects: 100% (6/6), done.
Delta compression using up to 12 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (6/6), 356 bytes | 356.00 KiB/s, done.
Total 6 (delta 0), reused 0 (delta 0)
remote:
remote: Create a pull request for 'master' on GitHub by visiting:
remote: https://github.com/LoneSurvivor1993/testGit/pull/new/master
remote:
To github.com:LoneSurvivor1993/testGit.git
* [new branch] master -> master
Branch 'master' set up to track remote branch 'master' from 'origin'.
3 IDEA git
https://github.com/fgnass/spin.js
,fork
新建一个分支
修改此处
添加
commit
到了本地
push
到远程服务端
3 直接在 IDEA 初始化
D盘新建
新建工程和module
将这个项目添加到本地仓库
add
commit
修改html1 和 html2 的 title,然后直接 commit
3.1 创建分支
不要直接在master上写代码,master主要用来跟踪上游master
用IDEA必须有的一个好的习惯,用 task
新建分支
然后直接commit
4 IDEA 分享项目到 github
创建项目