Skip to content

Instantly share code, notes, and snippets.

View Bigsby's full-sized avatar
💭
I have my moments...

Bruno Bernardo Bigsby

💭
I have my moments...
View GitHub Profile

Fetch Remote Branch

git fetch <remote> <remote_branch>:<local_branch> 
git checkout <local_branch>
git branch -u <remote>/<remote_branch>

Fetch Remote Branch - When branch doesn't exist locally

List System Path

for %a in ("%path:;=";"%") do @echo %~a
docs:
https://git.wiki.kernel.org/index.php/Aliases#Getting_the_diff_of_a_branch_since_it_forked_from_another_branch.2C_or_since_the_last_merge
complex example:
https://medium.com/@vitalyb/creating-powerful-git-aliases-3dfc0efc9a31#.o07jp91ea
cleanall = "!git reset --hard;git clean -fd"
diffu = !current=$(git symbolic-ref --short HEAD) && git log --oneline $current...origin/$current;
dBranch = "!f() { \
git log --oneline $1...origin/$1; \
@Bigsby
Bigsby / PCL.md
Last active November 28, 2016 11:42

Convert Library to PCL

link

In the .csproj file, replace:

<Import Project="..." />

by

$baseFolder = (Get-Location).Path
$command = "git pull"
Get-ChildItem -dir | ForEach-Object {
Set-Location -Path $_.FullName
Write-Host (Get-Location).Path
Invoke-Expression -Command $command
Write-Host
}
Set-Location $baseFolder
$baseFolder = (Get-Location).Path
$statusCommand = "git status -s"
$branchCommand = "git branch"
Get-ChildItem -dir | ForEach-Object {
Set-Location -Path $_.FullName
Write-Host (Get-Location).Path
Invoke-Expression -command $branchCommand
Invoke-Expression -command $statusCommand
Write-Host
}

Sections:

  • Thoughts
  • Gotchas
  • CV
  • Projects
    • .Net Core
    • Hello Languages
    • Summing Matrices
    • Web Boilerplate
  • Xamarin.Forms.OAuth
Windows Registry Editor Version 5.00
; Open files
[HKEY_CLASSES_ROOT\*\shell\Open with VS Code]
@="Edit with VS Code"
"Icon"="C:\\Program Files (x86)\\Microsoft VS Code\\Code.exe,0"
[HKEY_CLASSES_ROOT\*\shell\Open with VS Code\command]
@="\"C:\\Program Files (x86)\\Microsoft VS Code\\Code.exe\" \"%1\""
; This will make it appear when you right click ON a folder
; The "Icon" line can be removed if you don't want the icon to appear
[HKEY_CLASSES_ROOT\Directory\shell\vscode]
VS Code version of:
https://marketplace.visualstudio.com/items?itemName=MadsKristensen.Client-SideLibraryInstaller
https://marketplace.visualstudio.com/items?itemName=chrisdias.vscode-opennewinstance