OpsaC - Operating as PowerShell code
published: February 6, 2021 author: Tinu tags: PowerShell categories: GitLab
VSCode integrates Git version control. Download and install Git.
Git global settings are saved in “$($env:USERPROFILE).gitconfig” while local settings are saved in the root folder of the respective project.
The global settings can be set from “$($env:USERPROFILE).gitconfig” to another path by setting the environment variable HOME to the desired path (Example: $env:home = ‘D:\github’).
git config --global -l
git config --system -l
these settings can only be changed with admin rights.
git config --global user.name "John Doe"
git config --global user.email johndoe@example.com
[credential "https://github.com"]
username = 'Tinu'
[credential]
helper = wincred
[http "https://gitlab.company.int"]
proxy = http://proxy.company.int:8080/
[credential]
helper = wincred
[credential "https://gitlab.company.int"]
username = 'Tinu'
cd <your local working git folder>
git clone <git-url>
cd <your local working git project>
git pull
git add . | <file to add>
git commit -m "Commit message"
git push
git branch
git checkout -b <new_branch>
$branch_to_delete = 'new_branch'
git checkout master
git push origin --delete $branch_to_delete
git branch -D $branch_to_delete