想在github上保存一些平时写的测试程序,所以就建立了一个repository:https://github.com/commshare/testProgram

建立好之后,怎么把本地的代码上传呢。是个问题。

之前有clone到本地,然后再add 和push到服务器的经历:

centos6.3 安装gitosis http://blog.csdn.net/commshare/article/details/17002447
和http://blog.csdn.net/commshare/article/details/16965559   基于centos6.3第一次搭建一个git 服务器
当然,github上我已经有了第一个repository:http://blog.csdn.net/commshare/article/details/14166961  首次部署github上的repository
现在这个是把windows系统里,本地磁盘的一个文件夹里头的文件传到github上保存。

=============================

参考http://blog.sina.com.cn/s/blog_63eb3eec0101cf6x.html

参考 http://www.cnblogs.com/findingsea/archive/2012/08/27/2654549.html

参考 http://artori.us/git-github-usage/

参考 http://lazynight.me/2898.html

(1)安装git的工具,github的工具被墙了,所以装 这个TortoiseGit:http://msysgit.github.com/

下载地址 : http://code.google.com/p/tortoisegit/

装好之后,右键就不同了。

(2)在所要上次文件夹里头点击上面的git init here

(3)打开git bash  ,准备 ssh key。

ssh-keygen -t rsa -C "your_email@youremail.com"

存在这里:

要把id_rsa.pub传到github上,做为一个新的key。

Welcome to Git (version 1.8.4-preview20130916)

Run 'git help git' to display the help index.
Run 'git help <command>' to display help for specific commands.

ZhangBin@ZHANGBIN-PC /E/codeReocrdi (master)
$ ssh-keygen -t rsa -C "c*********e.zhang@gmail.com"
Generating public/private rsa key pair.
Enter file in which to save the key (/c/Users/ZhangBin/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /c/Users/ZhangBin/.ssh/id_rsa.
Your public key has been saved in /c/Users/ZhangBin/.ssh/id_rsa.pub.

ZhangBin@ZHANGBIN-PC /E/codeReocrdi (master)

(4)加入key到github上。

测试是否成功:

$ ssh -T git@github.com
The authenticity of host 'github.com (192.30.252.130)' can't be established.
RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,192.30.252.130' (RSA) to the list of know
n hosts.
Hi commshare! You've successfully authenticated, but GitHub does not provide she
ll access.

(5)加入新的账户(用户名和邮箱)

ZhangBin@ZHANGBIN-PC /E/codeReocrdi (master)
$ git config --global user.name "zhangbin"

ZhangBin@ZHANGBIN-PC /E/codeReocrdi (master)
$ git config --global user.email

ZhangBin@ZHANGBIN-PC /E/codeReocrdi (master)
$

ZhangBin@ZHANGBIN-PC /E/codeReocrdi (master)
$ git config --global user.email "c####e.zhang@gmail.com"

(6) 加入远程的github上的仓库,文件就是传入到这个仓库里头的。

进入要上传的仓库,右键git bash,添加远程地址:

ZhangBin@ZHANGBIN-PC /E/codeReocrdi (master)

$ git remote add orign git@github.com:c*******e/testProgram.git

ZhangBin@ZHANGBIN-PC /E/codeReocrdi (master)
$ git pull
fatal: No remote repository specified.  Please, specify either a URL or a
remote name from which new revisions should be fetched.

ZhangBin@ZHANGBIN-PC /E/codeReocrdi (master)
$ git pull origin master
fatal: 'origin' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

还是写成origin吧,

ZhangBin@ZHANGBIN-PC /E/codeReocrdi (master)
$ git remote add origin git@github.com:commshare/testProgram.git

(7)成功的从远程仓库取出数据

ZhangBin@ZHANGBIN-PC /E/codeReocrdi (master)
$ git pull origin master
remote: Counting objects: 3, done.
remote: Total 3 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
From github.com:commshare/testProgram
 * branch            master     -> FETCH_HEAD
 * [new branch]      master     -> origin/master

(8)给远程仓库传入数据

ZhangBin@ZHANGBIN-PC /E/codeReocrdi (master)
$ git add ./testTHIS.cpp

这个a 出错了:

ZhangBin@ZHANGBIN-PC /E/codeReocrdi (master)
$ git commit -m -a "test this pointer of C++ "
error: pathspec 'test this pointer of C++ ' did not match any file(s) known to g
it.

ZhangBin@ZHANGBIN-PC /E/codeReocrdi (master)
$ git commit -m  "test this pointer of C++ "
[master 172c3c8] test this pointer of C++
 1 file changed, 27 insertions(+)
 create mode 100644 testTHIS.cpp

ZhangBin@ZHANGBIN-PC /E/codeReocrdi (master)
$ git push
warning: push.default is unset; its implicit value is changing in
Git 2.0 from 'matching' to 'simple'. To squelch this message
and maintain the current behavior after the default changes, use:

git config --global push.default matching

To squelch this message and adopt the new behavior now, use:

git config --global push.default simple

See 'git help config' and search for 'push.default' for further information.
(the 'simple' mode was introduced in Git 1.7.11. Use the similar mode
'current' instead of 'simple' if you sometimes use older versions of Git)

Counting objects: 4, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 584 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To git@github.com:commshare/testProgram.git
   3a7460a..172c3c8  master -> master

ZhangBin@ZHANGBIN-PC /E/codeReocrdi (master)
$

======================================

然后,我又使用我的ubuntu12.04的zhangbin用户向这个仓库传入代码:

zhangbin@Ubuntu32:~/codeStore/testcode$ ls
FIFO  testBool  testBool.c  testlseek  testlseek.c  ts_length  ts_length.c
zhangbin@Ubuntu32:~/codeStore/testcode$ git init
Initialized empty Git repository in /home/zhangbin/codeStore/testcode/.git/

zhangbin@Ubuntu32:~/codeStore/testcode$ git remote add origin git@github.com:commshare/testProgram.git
zhangbin@Ubuntu32:~/codeStore/testcode$ git add testlseek

报错,好像是说先要加入新的用户:

zhangbin@Ubuntu32:~/codeStore/testcode$ git commit -m "test lseek for getting a file's length"
[master (root-commit) 7c752bc] test lseek for getting a file's length
 Committer: ZhangBin@Ubuntu32 <zhangbin@Ubuntu32.(none)>
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly:

git config --global user.name "Your Name"
    git config --global user.email you@example.com

After doing this, you may fix the identity used for this commit with:

git commit --amend --reset-author

1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100755 testlseek
zhangbin@Ubuntu32:~/codeStore/testcode$ git config --global user.name "zhangbin" 
zhangbin@Ubuntu32:~/codeStore/testcode$ git config --global user.email "我的邮箱@gmail.com"

还是报错,加入了用户之后,似乎应该先add?但实际上,上一个add在没有加入用户的时候,已经add成功了。

所以这下面没有testlseek了。

zhangbin@Ubuntu32:~/codeStore/testcode$ git commit -m "test lseek for getting a file's length"
# On branch master
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
# FIFO/
# testBool
# testBool.c
# testlseek.c
# ts_length
# ts_length.c
nothing added to commit but untracked files present (use "git add" to track)

直接这样报错:好像是要指定分支的:
zhangbin@Ubuntu32:~/codeStore/testcode$ git push
Warning: Permanently added the RSA host key for IP address '192.30.252.131' to the list of known hosts.
To git@github.com:commshare/testProgram.git
 ! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to 'git@github.com:commshare/testProgram.git'
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes (e.g. 'git pull') before pushing again.  See the
'Note about fast-forwards' section of 'git push --help' for details.
zhangbin@Ubuntu32:~/codeStore/testcode$ git add ./testlseek.c ./testlseek commit -m "test lseek for getting a file's length"
error: unknown switch `m'
usage: git add [options] [--] <filepattern>...

-n, --dry-run         dry run
    -v, --verbose         be verbose

-i, --interactive     interactive picking
    -p, --patch           select hunks interactively
    -e, --edit            edit current diff and apply
    -f, --force           allow adding otherwise ignored files
    -u, --update          update tracked files
    -N, --intent-to-add   record only the fact that the path will be added later
    -A, --all             add changes from all tracked and untracked files
    --refresh             don't add, only refresh the index
    --ignore-errors       just skip files which cannot be added because of errors
    --ignore-missing      check if - even missing - files are ignored in dry run

加入新的文件:
zhangbin@Ubuntu32:~/codeStore/testcode$ git add ./testlseek.c ./testlseek

注释成功:
zhangbin@Ubuntu32:~/codeStore/testcode$ git commit -m "test lseek for getting a file's length"
[master ed859ef] test lseek for getting a file's length
 1 file changed, 49 insertions(+)
 create mode 100644 testlseek.c

push失败:要指定分支
zhangbin@Ubuntu32:~/codeStore/testcode$ git push
To git@github.com:commshare/testProgram.git
 ! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to 'git@github.com:commshare/testProgram.git'
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes (e.g. 'git pull') before pushing again.  See the
'Note about fast-forwards' section of 'git push --help' for details.

zhangbin@Ubuntu32:~/codeStore/testcode$ git push origin master
To git@github.com:commshare/testProgram.git
 ! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to 'git@github.com:commshare/testProgram.git'
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes (e.g. 'git pull') before pushing again.  See the
'Note about fast-forwards' section of 'git push --help' for details.

貌似拉下来也失败:
zhangbin@Ubuntu32:~/codeStore/testcode$ git pull
warning: no common commits
remote: Counting objects: 6, done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 6 (delta 0), reused 3 (delta 0)
Unpacking objects: 100% (6/6), done.
From github.com:commshare/testProgram
 * [new branch]      master     -> origin/master
You asked me to pull without telling me which branch you
want to merge with, and 'branch.master.merge' in
your configuration file does not tell me, either. Please
specify which branch you want to use on the command line and
try again (e.g. 'git pull <repository> <refspec>').
See git-pull(1) for details.

If you often merge with the same branch, you may want to
use something like the following in your configuration file:
    [branch "master"]
    remote = <nickname>
    merge = <remote-ref>

[remote "<nickname>"]
    url = <url>
    fetch = <refspec>

See git-config(1) for details.

这么拉就好了:
zhangbin@Ubuntu32:~/codeStore/testcode$  git pull origin master
From github.com:commshare/testProgram
 * branch            master     -> FETCH_HEAD
Merge made by the 'recursive' strategy.
 README.md    |    2 ++
 testTHIS.cpp |   27 +++++++++++++++++++++++++++
 2 files changed, 29 insertions(+)
 create mode 100644 README.md
 create mode 100644 testTHIS.cpp

这么推也是好的:

zhangbin@Ubuntu32:~/codeStore/testcode$ git push origin master
Counting objects: 9, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (7/7), done.
Writing objects: 100% (8/8), 3.93 KiB, done.
Total 8 (delta 0), reused 0 (delta 0)
To git@github.com:commshare/testProgram.git
   172c3c8..3414346  master -> master
zhangbin@Ubuntu32:~/codeStore/testcode$

===========删掉一个文件

git rm --cached filename 
git commit -m "hehe" 
git push origin branch

======================后来老是遇到这些问题,就是push不上去,必须先pull===================

root@Ubuntu32:/home/zhangbin/STM/testcode# vi test_StrDup.c
root@Ubuntu32:/home/zhangbin/STM/testcode# gcc -o test_StrDup test_StrDup.c 
test_StrDup.c: In function ‘strDup’:
test_StrDup.c:6:16: warning: incompatible implicit declaration of built-in function ‘strlen’ [enabled by default]
test_StrDup.c:9:10: warning: incompatible implicit declaration of built-in function ‘memcpy’ [enabled by default]
root@Ubuntu32:/home/zhangbin/STM/testcode# ./test_StrDup 
after copy is [zhangbinhometown] 
root@Ubuntu32:/home/zhangbin/STM/testcode# git add test_StrDup.c 
root@Ubuntu32:/home/zhangbin/STM/testcode# git commit -m "字符串复制,来自live555"
[master d6ab4d6] 字符串复制,来自live555
 1 file changed, 18 insertions(+)
 create mode 100644 test_StrDup.c
root@Ubuntu32:/home/zhangbin/STM/testcode# git push
To git@github.com:commshare/testProgram.git
 ! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to 'git@github.com:commshare/testProgram.git'
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes (e.g. 'git pull') before pushing again.  See the
'Note about fast-forwards' section of 'git push --help' for details.
root@Ubuntu32:/home/zhangbin/STM/testcode# git push origin master
To git@github.com:commshare/testProgram.git
 ! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to 'git@github.com:commshare/testProgram.git'
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes (e.g. 'git pull') before pushing again.  See the
'Note about fast-forwards' section of 'git push --help' for details.
root@Ubuntu32:/home/zhangbin/STM/testcode# git push git pull
fatal: 'git' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
root@Ubuntu32:/home/zhangbin/STM/testcode# git push
^C
root@Ubuntu32:/home/zhangbin/STM/testcode# git pull
remote: Counting objects: 15, done.
remote: Compressing objects: 100% (10/10), done.
remote: Total 13 (delta 5), reused 11 (delta 3)
Unpacking objects: 100% (13/13), done.
From github.com:commshare/testProgram
   8bd6223..39097c5  master     -> origin/master
You asked me to pull without telling me which branch you
want to merge with, and 'branch.master.merge' in
your configuration file does not tell me, either. Please
specify which branch you want to use on the command line and
try again (e.g. 'git pull <repository> <refspec>').
See git-pull(1) for details.

If you often merge with the same branch, you may want to
use something like the following in your configuration file:
    [branch "master"]
    remote = <nickname>
    merge = <remote-ref>

[remote "<nickname>"]
    url = <url>
    fetch = <refspec>

See git-config(1) for details.
root@Ubuntu32:/home/zhangbin/STM/testcode# git push origin master
To git@github.com:commshare/testProgram.git
 ! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to 'git@github.com:commshare/testProgram.git'
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes (e.g. 'git pull') before pushing again.  See the
'Note about fast-forwards' section of 'git push --help' for details.
root@Ubuntu32:/home/zhangbin/STM/testcode# git pull origin master
From github.com:commshare/testProgram
 * branch            master     -> FETCH_HEAD
Merge made by the 'recursive' strategy.
 testIFDEFINE.c          |   26 ++++++++++++++++++++++++++
 testUpasting.cpp        |   37 +++++++++++++++++++++++++++++++++++++
 testUpastingVirtual.cpp |   37 +++++++++++++++++++++++++++++++++++++
 3 files changed, 100 insertions(+)
 create mode 100644 testIFDEFINE.c
 create mode 100644 testUpasting.cpp
 create mode 100644 testUpastingVirtual.cpp
root@Ubuntu32:/home/zhangbin/STM/testcode# git push origin master
Counting objects: 7, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 759 bytes, done.
Total 5 (delta 2), reused 0 (delta 0)
To git@github.com:commshare/testProgram.git
   39097c5..e0fa03f  master -> master
root@Ubuntu32:/home/zhangbin/STM/testcode#

######add 2014 01 13 #################################

后来,又新建立了一个java的测试工程保存路径。

加入了一些android的工程:

root@Ubuntu32:/home/zhangbin/ffmpeg/android/ndk-samples# git init
Initialized empty Git repository in /home/zhangbin/ffmpeg/android/ndk-samples/.git/
root@Ubuntu32:/home/zhangbin/ffmpeg/android/ndk-samples# git remote add origin https://github.com/commshare/meTestJavaProgram.git
root@Ubuntu32:/home/zhangbin/ffmpeg/android/ndk-samples# ls
bitmap-plasma    hello-jni       native-activity  san-angeles
gles3jni         hello-neon      native-audio     Teapot
HelloComputeNDK  module-exports  native-media     test-libstdc++
hello-gl2        MoreTeapots     native-plasma    two-libs
root@Ubuntu32:/home/zhangbin/ffmpeg/android/ndk-samples# git add hello-jni
root@Ubuntu32:/home/zhangbin/ffmpeg/android/ndk-samples# git commit -m "use hello-jni project to test fprintf replacement for android platform "
[master (root-commit) 038d666] use hello-jni project to test fprintf replacement for android platform
 38 files changed, 462 insertions(+)
 create mode 100755 hello-jni/.classpath
 create mode 100755 hello-jni/.project
 create mode 100755 hello-jni/.settings/org.eclipse.jdt.core.prefs
 create mode 100644 hello-jni/AndroidManifest.xml
 create mode 100755 hello-jni/bin/AndroidManifest.xml
 create mode 100755 hello-jni/bin/HelloJni.apk
 create mode 100755 hello-jni/bin/classes.dex
 create mode 100755 hello-jni/bin/classes/com/example/hellojni/BuildConfig.class
 create mode 100755 hello-jni/bin/classes/com/example/hellojni/HelloJni.class
 create mode 100755 hello-jni/bin/classes/com/example/hellojni/R$attr.class
 create mode 100755 hello-jni/bin/classes/com/example/hellojni/R$string.class
 create mode 100755 hello-jni/bin/classes/com/example/hellojni/R.class
 create mode 100755 hello-jni/bin/dexedLibs/annotations-bf65d065d2bf11dc7706959d18f5bc41.jar
 create mode 100755 hello-jni/bin/resources.ap_
 create mode 100755 hello-jni/gen/com/example/hellojni/BuildConfig.java
 create mode 100755 hello-jni/gen/com/example/hellojni/R.java
 create mode 100755 hello-jni/jni/Android.mk
 create mode 100755 hello-jni/jni/hello-jni.c
 create mode 100644 hello-jni/libs/armeabi/gdb.setup
 create mode 100755 hello-jni/libs/armeabi/gdbserver
 create mode 100755 hello-jni/libs/armeabi/libhello-jni.so
 create mode 100755 hello-jni/obj/local/armeabi/libhello-jni.so
 create mode 100644 hello-jni/obj/local/armeabi/objs-debug/hello-jni/hello-jni.o
 create mode 100644 hello-jni/obj/local/armeabi/objs-debug/hello-jni/hello-jni.o.d
 create mode 100755 hello-jni/project.properties
 create mode 100644 hello-jni/res/values/strings.xml
 create mode 100644 hello-jni/src/com/example/hellojni/HelloJni.java
 create mode 100755 hello-jni/tests/.classpath
 create mode 100755 hello-jni/tests/.project
 create mode 100755 hello-jni/tests/.settings/org.eclipse.jdt.core.prefs
 create mode 100644 hello-jni/tests/AndroidManifest.xml
 create mode 100755 hello-jni/tests/bin/AndroidManifest.xml
 create mode 100755 hello-jni/tests/bin/classes/com/example/hellojni/HelloJniTest.class
 create mode 100755 hello-jni/tests/bin/classes/com/example/hellojni/tests/BuildConfig.class
 create mode 100755 hello-jni/tests/bin/jarlist.cache
 create mode 100755 hello-jni/tests/gen/com/example/hellojni/tests/BuildConfig.java
 create mode 100755 hello-jni/tests/project.properties
 create mode 100644 hello-jni/tests/src/com/example/hellojni/HelloJniTest.java
root@Ubuntu32:/home/zhangbin/ffmpeg/android/ndk-samples# git push origin master
Username for 'https://github.com': 
Password for ': 
To https://github.com/commshare/meTestJavaProgram.git
 ! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to 'https://github.com/commshare/meTestJavaProgram.git'
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes (e.g. 'git pull') before pushing again.  See the
'Note about fast-forwards' section of 'git push --help' for details.

root@Ubuntu32:/home/zhangbin/ffmpeg/android/ndk-samples# git pull origin master
warning: no common commits
remote: Reusing existing pack: 17, done.
remote: Total 17 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (17/17), done.
From https://github.com/commshare/meTestJavaProgram
 * branch            master     -> FETCH_HEAD
Merge made by the 'recursive' strategy.
 testWriteByteArray/.classpath                      |    6 ++
 testWriteByteArray/.project                        |   17 ++++
 .../.settings/org.eclipse.jdt.core.prefs           |   11 +++
 testWriteByteArray/bin/writeArray.class            |  Bin 0 -> 1540 bytes
 testWriteByteArray/home.txt                        |    1 +
 testWriteByteArray/src/writeArray.java             |   93 ++++++++++++++++++++
 6 files changed, 128 insertions(+)
 create mode 100644 README.md
 create mode 100644 testWriteByteArray/.classpath
 create mode 100644 testWriteByteArray/.project
 create mode 100644 testWriteByteArray/.settings/org.eclipse.jdt.core.prefs
 create mode 100644 testWriteByteArray/bin/writeArray.class
 create mode 100644 testWriteByteArray/home.txt
 create mode 100644 testWriteByteArray/src/writeArray.java
root@Ubuntu32:/home/zhangbin/ffmpeg/android/ndk-samples# git push origin master
To https://github.com/commshare/meTestJavaProgram.git
   1710880..e4eb82c  master -> master
root@Ubuntu32:/home/zhangbin/ffmpeg/android/ndk-samples# 
---------------------
作者:commshare
来源:CSDN
原文:https://blog.csdn.net/commshare/article/details/17078093
版权声明:本文为博主原创文章,转载请附上博文链接!

在github上部署第二个repository的更多相关文章

  1. 新手小白在github上部署一个项目

    新手小白在github上部署一个项目 一. 注册github账号 github地址:https://www.github.com/ 二.下载安装Git 地址:https://git-scm.com/d ...

  2. 如何在github上部署自己的前端项目

    很多时候我们想需要一个地址就可以访问自己的前端作品, 但是注册一个服务器和域名是需要花钱,很多小伙伴都不愿意, 其实这种前端静态页面github就可以帮我们预览其效果,而且只要在有网的情况下都可以访问 ...

  3. 将项目部署到 github上(部署到码云操作一样,前提是有码云账号)

    来源:http://www.cnblogs.com/fengxiongZz/p/6477456.html 首先你需要自己的网页文件(俗称项目) 第一步:登录到Github上,新建一个repositor ...

  4. 关于Windows azure从github上部署项目

    自己做了一个闪存解析的webapi,今天尝试了一下加一个HelpPage,本地访问正常,但是在azure上就报错. 项目是不熟在WindowsAzure上的,项目自动同步github上的项目.gith ...

  5. GitHub的用法:到GitHub上部署项目

    先提供两个较好的Git教程: 1. 如何在github部署项目: lhttp://jingyan.baidu.com/article/656db918fbf70ce381249c15.html 2. ...

  6. 在GitHub上管理项目

    在GitHub上管理项目 新建repository 本地目录下,在命令行里新建一个代码仓库(repository) 里面只有一个README.md 命令如下: touch README.md git ...

  7. 命令行将本地代码上传到github及修改github上代码

    第一步:建立git仓库 cd到你的本地项目根目录下,(这是我的细目目录) 执行git命令 git init 第二步:将项目的所有文件添加到仓库中 git add . 如果想添加某个特定的文件,只需把. ...

  8. 通过Git Gui Here上传本地项目到GitHub上

    要使用此种方法上传本地项目到GitHub上,前提得是你已安装Git for window工具. Git for window下载地址:http://www.xp510.com/xiazai/Appli ...

  9. 如何通过TortoiseGit(小乌龟)把本地项目上传到github上

    1.第一步: 安装git for windows(链接:https://gitforwindows.org/)一路next就好了, 如果遇到什么问题可以参考我另外一篇文章~^ - ^ 2.第二步:安装 ...

随机推荐

  1. iOS中的几个重要方法

    iOS开发中几个重要的方法: 加载类到内存,程序刚启动的时候调用,调用在main函数之前 1.+(void)load{ } 初始化类,类第一次使用的时候调用一次 2.+(void)initialize ...

  2. Mysql高手系列 - 第5天:DML操作汇总,确定你都会?

    这是Mysql系列第5篇. 环境:mysql5.7.25,cmd命令中进行演示. DML(Data Manipulation Language)数据操作语言,以INSERT.UPDATE.DELETE ...

  3. codeforces 794 C. Naming Company(贪心)

    题目链接:http://codeforces.com/contest/794/problem/C 题意:有两个人每个人都有一个长度为n的字符串,两人轮流拿出一个字符串,放在一个长度为n的字符串的指定位 ...

  4. PythonI/O进阶学习笔记_3.2面向对象编程_python的封装

    前言: 本篇相关内容分为3篇多态.继承.封装,这篇为第三篇 封装. 本篇内容围绕 python基础教程这段: 在面向对象编程中,术语对象大致意味着一系列数据(属性)以及一套访问和操作这些数据的方法.使 ...

  5. erlang加密模块crypto的一些使用

    crypto 模块描述:该模块提供一系列加密函数: 散列函数-安全散列标准,MD5报文摘要算法(RFC 1321)和MD4报文摘要算法(RFC 1320); Hmac函数-散列消息认证(RFC 210 ...

  6. 【Offer】[10-2] 【青蛙跳阶问题】

    题目描述 思路分析 Java代码 代码链接 题目描述 一只青蛙一次可以跳上1级台阶,也可以跳上2级.求该青蛙跳上一个n级的台阶总共有多少种跳法(先后次序不同算不同的结果). 思路分析 其实就是斐波那契 ...

  7. Python集训营45天—Day02

    目录 变量和运算符 1.1 初步介绍 1.2 使用案例 1.3 知识点梳理 1.4 练习 序言:这一章我们将学习变量以及常见的类型,我们将以案例和代码相结合的方式进行梳理,但是其中所有的案例和知识点 ...

  8. 一个Android 架构师的成长之路

    前言 总所周知,当下流行的编程语言有Java.PHP.C.C++.Python.Go等.其中,稳坐榜首的仍然是Java编程语言,且在以面向对象思想占主导的应用开发中,Java往往成为其代名词.Java ...

  9. Winform中对ZedGraph的曲线标签进行设置,比如去掉标签边框

    场景 Winforn中设置ZedGraph曲线图的属性.坐标轴属性.刻度属性: https://blog.csdn.net/BADAO_LIUMANG_QIZHI/article/details/10 ...

  10. [LeetCode] 由 “找零钱" 所想

    Ref: [Optimization] Dynamic programming[寻找子问题] Ref: [Optimization] Advanced Dynamic programming[优于re ...