Star

Created With

linkBacking up your dotfiles/configurations to GitHub

One of the other great uses for GitHub is as a place to back up and share your dotfiles

linkDon't make the same mistake I did! Back up those damn files 😆

There are a variety of ways to back up your dotfiles.

The simplest is to create a repository names Dotfiles on GitHub.

Simply commit and add any dotfiles you wish to back up (e.g your .bashrc or .vimrc or .gitconfig)

linkFurther automate backing up of your dotfiles using a shell script place in your path, or set up as an alias

PLEASE NOTE: This is just one of MANY ways to back up your dotfiles. But this is basic and good for a beginner

linkCreate a .sh file. I call this one mergecheatsheets.sh

1link$#!/bin/bash

2link$

3link$# A script to merge my cheatsheets to my git backup repo

4link$

5link$cp -a /Users/admin/.cheatsheet/. /Users/admin/Git_Downloads/Dotfiles/Cheatsheets/

6link$echo "merging cheatsheets"

linkCreate an alias in your shell to call that shell script

1link$alias mergecheatsheets="~/.cheatsheet/merge-cheatsheets.sh"

linkRestart or source your shell configuration and then run your new command!

Screen-Shot-2021-03-13-at-1-29-39-pm.png

linkFinally, head to your dotfile repository and push the new changes to back them up

Backing up your dotfiles/configurations to GitHubDon't make the same mistake I did! Back up those damn files 😆Further automate backing up of your dotfiles using a shell script place in your path, or set up as an aliasCreate a .sh file. I call this one mergecheatsheets.shCreate an alias in your shell to call that shell scriptRestart or source your shell configuration and then run your new command!Finally, head to your dotfile repository and push the new changes to back them up
Content

Home Backstory Why Git? Setting Up GitHub GitHub CLI Your GitHub Profile GitHub Pages Creating A New Repo Cloning A Repository Your First Commit Ignoring Files In Git Stashing Your Changes Branching With Git Merging Git Branches Rebasing Vs Merging Git Workflows Fork And Pull Flow Your First Pull Request Automated Security Alerts Seeing The Differences Removing/Deleting Files Reverting Your Commits Configuring your Git Commit Templates Creating Shortcuts Dotfile Management Sponsoring Open Source Handy Commands Thank You



Developer Student Clubs

logo2.png