Table of Contents
vs 2019
step 1.安装插件Github Extension for VisualStudio
VS打开【扩展或更新】安装插件【Github Extension for VisualStudio】
1.github
1.1 新建私有仓库
登陆github,点击右上方“+”号,选择“New repository”,输入仓库名,本文使用的仓库名为private_test,然后选择私有仓库,点击创建即可。如图1所示。
1.2.删除仓库 (fork 的仓库)
2. Visual Studio git 目录存储位置
在*.sln方案文件下,会生成两个隐藏目录
2.1 \.git 存放本地提交内容
2.2 \.vs
可以删除这两个目录重来
https://www.cnblogs.com/xmai/p/9280710.html
Visual Studio 2019 version latest Release download url:
https://docs.microsoft.com/en-us/visualstudio/releases/2019/release-notes
Visual Studio 2019 Preview latest Release download url:
https://docs.microsoft.com/en-us/visualstudio/releases/2019/release-notes-preview
vs 2022 - exist repo
git exist repo
step 1:backup exist repo
step 2: delete directory and repo
step3: git from github.com
step 4: copy and overwrite soure code except .git and .vs directory
Visual Studio 2022中的 Git -new repo 202409
https://learn.microsoft.com/zh-cn/visualstudio/version-control/git-with-visual-studio?view=vs-2022
vs2022 git .gitignore文件不生效
step 1.从其他项目copy .gitignore 内容
step 2.进入项目当前目录
右键 选择 git bash
运行如下命令
git rm -r --cached .
[root@kevin ~]# git rm -r --cached .
[root@kevin ~]# git add .
[root@kevin ~]# git commit -m 'update .gitignore'
[root@kevin ~]# git push -u origin master