Automatically update all your git files with this Ruby script!
Ever spent neglected to update your git files because there were too many to deal with? My cool coworker Tom Czarniecki showed me this cool script that allows him to update all his git files at once. Here’s how it works!
Step 1: the Ruby script
Open your text editor of choice, create a new file, and save it as gitupdatescript.rb (or another filename of your choice) in the root of your folder containing git files. Copy and paste the following code into the file:
#!/usr/bin/env ruby
require 'fileutils'
Dir.glob('**/.git').each do |path|
  next if File.file?(path) # don't process submodules
  start_time = Time.now
  project_base = File.expand_path("#{path}/..")
  puts "In #{project_base}"
  FileUtils.cd(project_base) do
    system('git stash')
    puts "Update failed" unless system('git pull --rebase')
    system('git stash pop')
  end
  end_time = Time.now
  puts "Done in #{end_time - start_time} sec"
  puts
end
Step 2: turn the file into an executable
We’ll now be using the command line to allow this file to modify our computer’s files. I use a Mac, so please be sure to translate to other languages as needed (and let me know if it works!). cd to the folder containing the ruby file we created and enter the following code:
chmod +x gitupdatescript.rb
If your ruby file is located elsewhere, include the path to the file in your command.
Step 3: execute your new script
To run your script, just type ./gitupdatescript.rb and it should start updating git files!
Upcoming talks
- 
            Grow, Influence, and Lead as an Individual ContributorAt some point in your career, you'll likely have to choose between Senior Individual Contributor (IC) and Design Management roles. But what if you don't want to manage others? What if you'd rather continue as an expert contributor? Will you get bored and find your career stalling out? In this talk, we'll take a deep dive into Staff / Principal Designer roles — a combination of team leadership and in-the-pixels design work — all without any direct people management. Learn how you can advocate for, grow into, and succeed in such IC leadership roles. 
Want to talk?
Got feedback, looking to suggest a future writing topic, or want to invite me to speak at your organization? Send me a message and I'll get back to you as soon as possible!