iceycode
10/24/2017 - 2:50 AM

Git Reference

Git cheat sheets and scripts for Powershell (and/or other script types - bat, sh).

 

# 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




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;
}