Often need to do this for appsettings.json
files or Tests.runsettings
files
Tip:
Often need to do this for appsettings.json
files or Tests.runsettings
files
Tip:
git config credential.helper store
There are some interesting articles out there about git submodules
Tips:
References:
References:
I recently ran into an issue – after downloading my c# project from github, i could not build the project. basically on compilation, the project was complaining saying there were missing references and such.
It seemed the problem was because VS was assuming that the packages are there, so it was avoiding downloading the packages again. However, the content inside the ‘packages’ folder was not complete – aka .dlls were missing from the packages folder because there had been git-ignored.
It seems I had not done the gitignore properly ! In the references below, there is an example of how to gitignore VS projects properly.
<snip> # NuGet Packages *.nupkg # The packages folder can be ignored because of Package Restore **/packages/* # except build/, which is used as an MSBuild target. !**/packages/build/ # Uncomment if necessary however generally it will be regenerated when needed #!**/packages/repositories.config # NuGet v3's project.json files produces more ignoreable files *.nuget.props *.nuget.targets </snip>
References:
Tips:
I recently had to figure out how to save my git credentials, so i wouldn’t have to keep typing them repeatedly.
The references below helped me get past the issue. Some notes below:
Notes:
References:
$ git help credentials. <--
Read this! Very Useful
Tips:
[1] First note that there is a difference between ‘revert’ and ‘reset’
[2] Undoing a ‘git add’ before doing a ‘git commit’
Note: For this scenario, most of the above links are recommending doing a ‘git reset’. There is a difference between a ‘soft’ reset and a ‘hard’ reset.
[3] Recently I had to undo a commit I had made into my local git repo. I was under the impression that reverting commits in Git is a big hassle. To my surprise, it didn’t prove to be too much of a pain. These are things I had to do basically:
couple of git reset --soft HEAD~ commands (because there was stuff I had pulled into my repo after commiting)
That was it! I got my repo back to sanity.
[4] Another import task is to view unpushed git commits. this is an important thing to do, especially before making commits into a remote branch.
References: