Skip to content

Instantly share code, notes, and snippets.

View matholamew's full-sized avatar
💻
ABC - Always be coding!

matholamew

💻
ABC - Always be coding!
  • Boston, MA
View GitHub Profile
@awayken
awayken / Split-File.ps1
Created June 25, 2013 20:10
Split files using Powershell, modified from: http://stackoverflow.com/a/11010158/215200
# Modified from: http://stackoverflow.com/a/11010158/215200
$fromFolder = "D:\FOLDER\"
$rootName = "FILENAME"
$ext = "EXT"
$from = "{0}{1}.{2}" -f ($fromFolder, $rootName, $ext)
$fromFile = [io.file]::OpenRead($from)
$upperBound = 100MB

Get Latest Code Version - Git

Case 1: Don’t care about local changes

  • Solution 1: Get the latest code and reset the code
git fetch origin
git reset --hard origin/[tag/branch/commit-id usually: master]