1. 程式人生 > >上傳程式碼到Git遠端倉庫(Github)

上傳程式碼到Git遠端倉庫(Github)

一 在官網https://github.com/註冊一個賬號。
二 在網站內建立一個倉庫,取名叫code。 三 將本地的檔案上傳到遠端倉庫。 [[email protected] ~]# pwd /root [[email protected] ~]# echo "# code" >>READE.md [[email protected] ~]# cat READE.md  # code [[email protected] ~]# git init Initialized empty Git repository in /root/.git/ [[email protected]
~]# git add READE.md [[email protected] ~]# git commit -m "first commit" [master (root-commit) 81a76a3] first commit  1 file changed, 1 insertion(+)  create mode 100644 READE.md [[email protected] ~]# git remote add origin https://github.com/cakin24/code.git [[email protected] ~]# git push -u origin master Username for 'https://github.com': cakin24 Password for 'https://
[email protected]
':  Counting objects: 3, done. Writing objects: 100% (3/3), 211 bytes | 0 bytes/s, done. Total 3 (delta 0), reused 0 (delta 0) To https://github.com/cakin24/code.git  * [new branch]      master -> master Branch master set up to track remote branch master from origin. [[email protected]
~]# vim READE.md  [[email protected] ~]# git add READE.md [[email protected] ~]# git commit -m "second commit" [master f7f5350] second commit  1 file changed, 1 insertion(+) [[email protected] ~]# git push -u origin master Username for 'https://github.com': cakin24 Password for 'https://[email protected]':  Counting objects: 5, done. Writing objects: 100% (3/3), 246 bytes | 0 bytes/s, done. Total 3 (delta 0), reused 0 (delta 0) To https://github.com/cakin24/code.git    81a76a3..f7f5350  master -> master Branch master set up to track remote branch master from origin. 四 驗證是否上傳成功
 

相關推薦

Git——新手入門與專案到遠端倉庫GitHub

 建立原生代碼倉庫  開啟Git Bash 首先配置自己的身份,這樣在提交程式碼的時候就能知道是誰提交的 輸入git config --global user.name "名字" git config --global user.email "郵箱地址" 配置

git第一次程式碼遠端倉庫 ---- 命令列方式

1、CMD切換到所上傳的專案中 2、專案中如果沒有README.md檔案,建議建立此檔案 $ touch README.md 3、git init此專案 $ git init 4、把專案放入快取區 $ git add .      ---注意此處

Git程式碼遠端倉庫

1.Git安裝 2.建立專案## 新建賬號 建立專案 點選右上角+號,然後新建專案 輸入專案名稱,中文名稱會自動生成英文地址,很貼心。如果是不便公開的專案,選擇“私有” 3.配置##

git和svn程式碼遠端倉庫

一.git 往coding上初次上傳專案流程 1、首先在coding建立專案,建立後再- -程式碼-獲取訪問的https 2、克隆 $ cd  找個放空專案的地方 (新建一個空的資料夾,然後cd進入到這個資料夾) $ git clone https://coding.net

Git 程式碼遠端倉庫以及從遠端庫克隆

1、下載安裝Git 一、建立版本庫 1、開啟git輸入命令卻換到本地倉庫目錄下 2、通過命令git init 把這個目錄變成git可以管理的倉庫,如下: 3、在本地目錄下新建一個記事本檔案 readme.txt 內容如下:this is a test(可隨意寫); 

Git程式碼遠端倉庫

一、建立本地git庫 1、git init //在/home/gab/GitTest/目錄下構造本地git庫,該目錄下會出現 .git/ 檔案 2、編寫幫助檔案 touch README.md(建立幫助檔案) git add README

初步建立遠端倉庫,將本地倉庫git 遠端倉庫

最近開始做一個新的專案,在第一步建立遠端倉庫都遇到的麻煩, 一直處這個錯: ! [rejected] master -> master (fetch first) error: failed to push some refs to

程式碼Git遠端倉庫(Github)

一 在官網https://github.com/註冊一個賬號。 二 在網站內建立一個倉庫,取名叫code。 三 將本地的檔案上傳到遠端倉庫。 [[email protected] ~]# pwd /root [[email protected] ~]# echo "# code" >

Git常用命令及專案到遠端倉庫 拉取專案到本地倉庫:轉

Git篇 安裝之後第一步 安裝 Git 之後,你要做的第一件事情就是去配置你的名字和郵箱,因為每一次提交都需要這些資訊: git config --global user.name “bukas” git config --global user.email "[email p

Git 遠端倉庫(Github) Git 並不像 SVN 那樣有個中心伺服器。 目前我們使用到的 Git 命令都是在本地執行,如果你想通過 Git 分享你的程式碼或者與其他開發人員合作。 你就需要

Git 遠端倉庫(Github) Git 並不像 SVN 那樣有個中心伺服器。 目前我們使用到的 Git 命令都是在本地執行,如果你想通過 Git 分享你的程式碼或者與其他開發人員合作。你就需要將資料放到一臺其他開發人員能夠連線的伺服器上。 本例使用了 Github 作為遠端倉庫,你可以先閱讀我們的 G

Git檔案到遠端倉庫||更改遠端倉庫目錄下的內容

首先我們得在github上建立一個倉庫。 填好倉庫名稱、描述,然後提交就可以了。 在本地安裝好Git,俺使用的是bash. 首先配置一下使用者名稱和郵箱~ git config --global user.name "此處為你的github使

將本地新建程式碼git遠端程式碼

場景 在本地已經建立了程式碼庫並且已經儲存了檔案,現在想把程式碼上傳到遠端的程式碼庫上: 1、首選在雲端建立一個空的程式碼庫 git init --bare test.git 2、在本地專案的根

git程式碼失敗,報警正在向當前倉庫載入另一個遠端倉庫

warning: adding embedded git repository: zyn_src/laser_filters hint: You’ve added another git repository inside your current repository. hint: Clo

使用Git程式碼github,coding等倉庫

生成ssh 這個不多說了,很常見了,前面的文章也有分多次用到 ssh-keygen -t rsa -C "[email protected]" 配置ssh 複製id_rsa.pub檔案內容去

git建立本地倉庫程式碼gitHub 及常見問題解決(更新)

一、對於新建repository: 本地專案資料夾 git bash here; git init 並複製專案程式碼到本地倉庫; git add . git commit -m“first” 連線程式碼至GitHub:在GitHub新建repositor

IDEA使用總結1-Github下載程式碼程式碼Git

      1、 首先你需要在IDEA中建立一個專案,建立完專案後使能版本管理外掛 選擇git後建立本地git倉庫成功,提示如下   2、第二步 commit程式碼到 commit時會提示是否需要進行檢查什麼的  

基於TortoiseGit完成原生代碼Git遠端倉庫

    今天涉及到了要將本地的程式碼檔案上傳到現有的Git遠端倉庫中去,這個我之前沒有去使用過,只用過SVN來做版本控制了,座椅今天花了點時間來簡單學習一下,之前使用SVN的時候我使用的工具是TortoiseSVN,一個很小巧但是很強大的管理工具,今天上傳Git遠端倉庫我使用的工

在eclipse中使用git clone 別人共享在Github的代碼和到自己的倉庫

log 一個 port cef jpg inf require find 兩個 原文地址:http://www.itdaan.com/blog/2014/10/24/ff5e03b5cefef19e1b6fbb7b49809846.html1.在eclipse中安裝git:

git程式碼報錯ssh: connect to host github.com port 22: Connection timed out解決辦法

當在遠端庫上設定了SSH 之後還是報錯連線超時,問題如下 $ git push origin master ssh: connect to host github.com port 22: Connection timed out fatal: Could not read

如何在IDE中使用Git程式碼GIThub

步驟 先新增使用者: “Window”->”Preferences”->”Team”->”Configuration”,沒有賬號的話點選”Add Entry”來新增賬號 建立倉庫: 右擊資料夾->”Team”->”Share Pro