[英]GIT SSH Connection to server and create repository there and add files
我需要git幫助。 我有一個服務器,用戶名和parol。 我與ssh成功連接,但無法添加文件。 當我想使用git add使用bash添加文件(從我的本地PC)時,重試無法找到文件路徑或路徑不存在。 我認為它正在搜索服務器中的文件或目錄。
謝謝。
使用Git,您不必直接在服務器上創建存儲庫。 相反,你
git init
), git add
) git commit
) git remote add
)
git push
) 示例腳本:
$ cd your_local_project_dir/ # Get into your your project directory
$ git init # Initialize a local repository
$ git add --all # Stage all files from your local project
# directory for commit (note this is not
# adding to the repository yet, it's just
# "prepare them to add into the repo")
$ git commit -m "Initial commit" # Add the staged files to the local repository
$ git remote add origin https://server.com/user/project_name.git
# Link the local repository to a remote one
$ git push -u origin master # Upload you local repository data to the
# remote one
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.