[英]Can we export local commits from GIT repository and import them on another system
[英]Git local repository commits export
我可能有一個愚蠢的問題。我要在我的項目中使用本地存儲庫。 是否可以將帶有所有提交歷史記錄的整個存儲庫導出到遠程數據庫(例如,我將在半年內創建它)。 例如,所有提交都會出現在github或其他遠程git平台的提交歷史中嗎?
是的,它將所有提交歷史記錄推送到遠程分支。
只需添加遠程分支並推送
git remote add origin https://github.com/user/repo.git
然后通過以下命令推送
git push <remote_branch> <local_branch>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.