受欢迎的博客标签

git-VS2022中使用Git建立源代码管理 -github

Published

 

 

 

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方案文件下,会生成两个隐藏目录

你的项目目录
├── .git/
└── .gitignore

2.1 \.git  存放本地提交内容

2.2 \.vs

.vs 是 Visual Studio 的本地缓存/工作状态目录

常见用途包括:

IntelliSense / 代码索引缓存
调试器的一些本地状态
Visual Studio 用户配置
解决方案本地状态
数据库/索引缓存
部分调试和设计器缓存

可以删除这两个目录重来

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( Visual Studio 中克隆 Git 存储库)


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

detail

open vs2022

choice git clone

 

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

 

git windows  右键选择项目- 选择忽略

output

.gitignore

################################################################################
# 此 .gitignore 文件已由 Microsoft(R) Visual Studio 自动创建。
################################################################################

+/Admin2/.local-firefox/Win64-92.0a1/firefox
+/Admin2/.local-chromium/Win64-884014/chrome-win

 

How to use

vs2026 git 里面,如何实现git commit -m “” -m ""的效果

Visual Studio  Commit Message 输入框,用空行区分 Subject 和 Body。

fix: 修复股票 JSON 导入问题

1. 增加 MongoDB 持久化
2. 增加重复数据检测
3. 增加定时导入任务

 

 

 

https://learn.microsoft.com/zh-cn/visualstudio/version-control/git-clone-repository?view=vs-2022