your GitHub Enterprise Server instance. 为避免错误,请勿使用自述文件、许可或 gitignore 文件初始化新仓库。 您可以在项目推送到 GitHub Enterprise Server 之后添加这些文件。
1. 打开 Terminal(终端)Terminal(终端)Git Bash。
3. 将当前工作目录更改为您的本地仓库。
4. 将本地目录初始化为 Git 仓库。
$ git init -b main
在新的本地仓库中添加文件。 这会暂存它们用于第一次提交。
$ git add .
# Adds the files in the local repository and stages them for commit. 要取消暂存文件,请使用 'git reset HEAD YOUR-FILE'。
提交暂存在本地仓库中的文件。
$ git commit -m "First commit"
# Commits the tracked changes and prepares them to be pushed to a remote repository. 要删除此提交并修改文件,请使用 'git reset --soft HEAD~1' 并再次提交和添加文件。
在 GitHub Enterprise Server 仓库的 Quick Setup(快速设置)页面顶部,单击 复制远程仓库 URL。
your GitHub Enterprise Server instance. 为避免错误,请勿使用自述文件、许可或 gitignore 文件初始化新仓库。 您可以在项目推送到 GitHub Enterprise Server 之后添加这些文件。
1. 打开 Terminal(终端)Terminal(终端)Git Bash。
3. 将当前工作目录更改为您的本地仓库。
4. 将本地目录初始化为 Git 仓库。
$ git init -b main
在新的本地仓库中添加文件。 这会暂存它们用于第一次提交。
$ git add .
# Adds the files in the local repository and stages them for commit. 要取消暂存文件,请使用 'git reset HEAD YOUR-FILE'。
提交暂存在本地仓库中的文件。
$ git commit -m "First commit"
# Commits the tracked changes and prepares them to be pushed to a remote repository. 要删除此提交并修改文件,请使用 'git reset --soft HEAD~1' 并再次提交和添加文件。
在 GitHub Enterprise Server 仓库的 Quick Setup(快速设置)页面顶部,单击 复制远程仓库 URL。
your GitHub Enterprise Server instance. 为避免错误,请勿使用自述文件、许可或 gitignore 文件初始化新仓库。 您可以在项目推送到 GitHub Enterprise Server 之后添加这些文件。
1. 打开 Terminal(终端)Terminal(终端)Git Bash。
3. 将当前工作目录更改为您的本地仓库。
4. 将本地目录初始化为 Git 仓库。
$ git init -b main
在新的本地仓库中添加文件。 这会暂存它们用于第一次提交。
$ git add .
# Adds the files in the local repository and stages them for commit. 要取消暂存文件,请使用 'git reset HEAD YOUR-FILE'。
提交暂存在本地仓库中的文件。
$ git commit -m "First commit"
# Commits the tracked changes and prepares them to be pushed to a remote repository. 要删除此提交并修改文件,请使用 'git reset --soft HEAD~1' 并再次提交和添加文件。
在 GitHub Enterprise Server 仓库的 Quick Setup(快速设置)页面顶部,单击 复制远程仓库 URL。