想在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. ccflow关于流程引擎的父子流程的基本概念

    关键字:驰骋BPM jflow,ccflow, 驰骋工作流引擎 父子流程概念:在管理活动中,通用的部分,公用的部分,可以被重复执行的部分的流程管理活动我们把他独立出来,成为子流程,可以被其他流程的管理 ...

  2. Badboy - 导出脚本,用于JMeter并发测试

    参考: http://leafwf.blog.51cto.com/872759/1141011 http://www.51testing.com/html/00/130600-1367743.html ...

  3. gym/102059/problem/I. Game on Plane SG函数做博弈

    传送门: 题意: 给定一个正n边形的点.双方轮流连点成线,要求所画的线不能与之前的线相交.当某个人连成一个回路,这个人就输了.问先手必胜还是后手必胜. 思路: SG函数,因为一条线相当于把图劈成了两半 ...

  4. hihocoder [Offer收割]编程练习赛18 C 最美和弦(dp)

    题目链接:http://hihocoder.com/problemset/problem/1532 题解:一道基础的dp,设dp[i][j][k][l]表示处理到第几个数,当前是哪个和弦错了几次初始x ...

  5. lightoj 1021 - Painful Bases(数位dp+状压)

    题目链接:http://www.lightoj.com/volume_showproblem.php?problem=1021 题解:简单的数位dp由于总共就只有16个存储一下状态就行了.求各种进制能 ...

  6. codeforces 701 E. Connecting Universities(树+ 边的贡献)

    题目链接:http://codeforces.com/contest/701/problem/E 题意:有n个城市构成一棵树,一个城市最多有一个学校,这n个城市一共2*k个学校,要对这2*k个学校进行 ...

  7. Shiro实现用户对动态资源细粒度的权限校验

    前言 在实际系统应用中,普遍存在这样的一种业务场景,需要实现用户对要访问的资源进行动态权限校验. 譬如,在某平台的商家系统中,存在商家.品牌.商品等业务资源.它们之间的关系为:一个商家可以拥有多个品牌 ...

  8. python实现煲机脚本

    生日的时候女票送了一副新耳机,还挺帅气. 装逼界的人都知道,新耳机是有"煲"这个步骤的 至于有没有效果?怎么煲?煲多久?这些问题都是耳机界常年争执的问题,各路高手分成各种门派常年杀 ...

  9. Linux安装yum install gcc-c++出错:Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was 14: curl#6 - "Could not resolve host: mirrorlist.centos...

    错误如图: 解决办法: 1.修改配置文件 /etc/resolv.conf,该配置文件如下: 2.输入:gedit resolv.conf,修改配置文件内容如下: 3.然后重启: 4.重新进行安装: ...

  10. eclipse使用Gitlab

    1.生成SSH key 用的是eclipse自带的生成key的工具,windows->preferences->General->Network Connections->SS ...