Last active
March 20, 2019 02:17
-
-
Save iceycode/0f8e876fdaee4c25666578578116692b to your computer and use it in GitHub Desktop.
[Git Management Snippets] Git cheat sheets and scripts for Powershell (and/or other script types - bat, sh).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Dump file | |
*.stackdump | |
# Folder config file | |
[Dd]esktop.ini | |
# Recycle Bin used on file shares | |
$RECYCLE.BIN/ | |
# Windows Installer files | |
*.cab | |
*.msi | |
*.msm | |
*.msp | |
# Windows shortcuts | |
*.lnk | |
# Compiled source # | |
################### | |
*.com | |
*.class | |
*.dll | |
*.exe | |
*.o | |
*.so | |
# Packages # | |
############ | |
# it's better to unpack these files and commit the raw source | |
# git has its own built in compression methods | |
*.7z | |
*.dmg | |
*.gz | |
*.iso | |
*.jar | |
*.rar | |
*.tar | |
*.zip | |
# Logs and databases # | |
###################### | |
*.log | |
*.sql | |
*.sqlite | |
# OS generated files # | |
###################### | |
# OSX Files # | |
.DS_Store | |
.DS_Store? | |
._* | |
.Spotlight-V100 | |
.Trashes | |
# Windows files # | |
ehthumbs.db | |
Thumbs.db | |
# ehthumbs_vista.db # only on vista | |
# installation files | |
*.cab | |
*.msi | |
*.msm | |
*.msp | |
# shortcuts | |
*.lnk | |
# Dump file | |
*.stackdump | |
# Folder config file | |
[Dd]esktop.ini | |
# Recycle Bin used on file shares | |
$RECYCLE.BIN/ | |
# IDE files # | |
############# | |
nbproject | |
.~lock.* | |
.buildpath | |
.idea | |
.project | |
.settings | |
composer.lock | |
# Visual Studio Code # | |
.vscode/* | |
## UNCOMMENT BELOW 4 IF USING VSCode IDE #####3 | |
# Add below files to NOT ignore, since cross-platform settings # | |
#!.vscode/settings.json | |
# !.vscode/tasks.json | |
# !.vscode/launch.json | |
# !.vscode/extensions.json | |
# Audio # | |
############# | |
*.wav | |
*.mp3 | |
*.wma | |
# Images # | |
############# | |
*.jpg | |
*.gif | |
*.png | |
*.svg | |
*.ico | |
*.jpeg | |
*.bmp | |
*.psd | |
# Video # | |
############# | |
*.wmv | |
*.mpg | |
*.mpeg | |
*.mp4 | |
*.mov | |
*.flv | |
*.avi | |
*.ogv | |
*.ogg | |
*.webm | |
# Fonts # | |
############# | |
*.eot | |
*.ttf | |
*.woff | |
# npm_modules # | |
############# | |
*/npm_modules/* | |
# Dropbox # | |
# settings & cachces # | |
###################### | |
.dropbox | |
.dropbox.attr | |
.dropbox.cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Install-PoshGit() { | |
(new-object Net.WebClient).DownloadString("http://psget.net/GetPsGet.ps1") | iex install-module posh-git | |
} | |
function Start-GitClone($remoteUrl, $workspaceDir, $username){ | |
& cd $workspaceDir | |
if ($remoteUrl -ncontains $username){ | |
$remoteUrl = Read-Host "Please enter CLONED remote url, not the upstream original" | |
} | |
& git clone $remoteUrl; | |
} | |
function Set-GitFlow(){} | |
function Set-UpstreamRemoteTracking($remote_url){ | |
& git remote add upstream "$($remote_url)"; | |
& git fetch upstream; | |
& git checkout -b upstream-master --track upstream/master; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment