提交原本地專案到遠端git

weixin_33912445發表於2017-04-18

需求:
比如:我在本地有個專案一直開發,開發的差不多了,我需要提交到遠端git倉庫,遠端git倉庫,我已經建好了一個叫做
recorder-manager的專案,我本地的專案都在目錄recorder上,操作如下:

1、首先進入到對應的目錄
2、在對應的目錄中執行 git init
3、把需要新增到git上的庫的檔案,執行add操作,比如我需要把src/下面的所有檔案以及 pom.xml檔案全部上傳到git上

git add src/
git add pom.xml

4、git commit

#新增了相關注釋
git commit -am 'frrst commit recorder manager project'

5、把當前專案push到遠端git倉庫


ss:~ wqp$ cd /Users/wangqiupeng/Documents/workspacenew/recorder
ss:recorder wqp$ ls
catalina.base_IS_UNDEFINED  pom.xml             src             target
ss:recorder wqp$ git init
Initialized empty Git repository in /Users/wangqiupeng/Documents/workspacenew/recorder/.git/
ss:recorder wqp$ git add src/
ss:recorder wqp$ git add pom.xml
ss:recorder wqp$ git commit -am 'frrst commit recorder manager project'
[master (root-commit) 1e786df] frrst commit recorder manager project
 23 files changed, 848 insertions(+)
 create mode 100644 pom.xml
 create mode 100644 src/main/.DS_Store
 create mode 100644 src/main/java/cc/cloudp/record/manage/entity/Participant.java
 create mode 100644 src/main/java/cc/cloudp/record/manage/service/CallRecorderService.java
 create mode 100644 src/main/java/cc/cloudp/record/manage/service/impl/CallRecorderServiceImpl.java
 create mode 100644 src/main/java/cc/cloudp/record/manage/service/test/TestJson.java
 create mode 100644 src/main/java/cc/cloudp/util/ConfigManager.java
 create mode 100644 src/main/java/cc/cloudp/util/SpringUtil.java
 create mode 100644 src/main/java/dubbo/Application.java
 create mode 100644 src/main/java/dubbo/service/impl/RecorderServiceImpl.java
 create mode 100644 src/main/java/jni/RecorderHandler.class
 create mode 100644 src/main/java/jni/RecorderHandler.java
 create mode 100644 src/main/java/jni_RecorderHandler.cpp
 create mode 100644 src/main/java/jni_RecorderHandler.h
 create mode 100755 src/main/java/libRecorderHandler.dylib
 create mode 100644 src/main/java/untitled
 create mode 100644 src/main/resources/applicationContext.xml
 create mode 100644 src/main/resources/config.properties
 create mode 100644 src/main/resources/dubbo/zookeeper/applicationContext-dubbo-consumer.xml
 create mode 100644 src/main/resources/dubbo/zookeeper/applicationContext-dubbo-provider.xml
 create mode 100644 src/main/resources/logback.xml
 create mode 100644 src/main/webapp/WEB-INF/web.xml
 create mode 100644 src/main/webapp/index.jsp
ss:recorder wqp$ git remote add orgin git@gitolite:recorder-manager
ss:recorder wqp$ git remote -v
orgin   git@gitolite:recorder-manager (fetch)
orgin   git@gitolite:recorder-manager (push)
ss:recorder wqp$ git push orgin master
Counting objects: 46, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (37/37), done.
Writing objects: 100% (46/46), 13.55 KiB | 0 bytes/s, done.
Total 46 (delta 1), reused 0 (delta 0)
To gitolite:recorder-manager
 * [new branch]      master -> master
ss:recorder wqp$

REF git commit remote

相關文章