在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:necolas/dotfiles开源软件地址:https://github.com/necolas/dotfiles开源编程语言:Shell 86.3%开源软件介绍:Dotfiles (Nicolas Gallagher)My OS X dotfiles. How to installThe installation step requires the XCode Command Line
Tools and may overwrite existing
dotfiles in your HOME and $ bash -c "$(curl -fsSL raw.github.com/necolas/dotfiles/master/bin/dotfiles)" N.B. If you wish to fork this project and maintain your own dotfiles, you must
substitute my username for your own in the above command and the 2 variables
found at the top of the How to updateYou should run the update when:
Run the dotfiles command: $ dotfiles Options:
FeaturesAutomatic software installationHomebrew formulae:
Node packages: Vim plugins:
Custom OS X defaultsCustom OS X settings can be applied during the $ osxdefaults Bootable backup-drive scriptThese dotfiles include a script that uses $ backup For more information on how to setup your backup-drive, please read the preparatory steps in this post on creating a Mac OS X bootable backup drive. Custom bash promptI use a custom bash prompt based on the Solarized color palette and influenced by @gf3's and @cowboy's custom prompts. For best results, you should install iTerm2 and import Solarized Dark.itermcolors. When your current working directory is a Git repository, the prompt will display the checked-out branch's name (and failing that, the commit SHA that HEAD is pointing to). The state of the working tree is reflected in the following way:
Further details are in the Screenshot: Local/private Bash and Vim configurationAny special-case Vim directives local to a machine should be stored in a
Any private and custom Bash commands and configuration should be placed in a
Here is an example # PATH exports
PATH=$PATH:~/.gem/ruby/1.8/bin
export PATH
# Git credentials
# Not under version control to prevent people from
# accidentally committing with your details
GIT_AUTHOR_NAME="Nicolas Gallagher"
GIT_AUTHOR_EMAIL="[email protected]"
GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME"
GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL"
# Set the credentials (modifies ~/.gitconfig)
git config --global user.name "$GIT_AUTHOR_NAME"
git config --global user.email "$GIT_AUTHOR_EMAIL"
# Aliases
alias code="cd ~/Code" N.B. Because the Custom location for Homebrew installationIf your Homebrew installation is not in # Add `brew` command's custom location to PATH
PATH="/opt/acme/bin:$PATH" Adding new git submodulesIf you want to add more git submodules, e.g., Vim plugins to be managed by pathogen, then follow these steps while in the root of the superproject. # Add the new submodule
git submodule add https://example.com/remote/path/to/repo.git vim/bundle/one-submodule
# Initialize and clone the submodule
git submodule update --init
# Stage the changes
git add vim/bundle/one-submodule
# Commit the changes
git commit -m "Add a new submodule: one-submodule" Updating git submodulesUpdating individual submodules within the superproject: # Change to the submodule directory
cd vim/bundle/one-submodule
# Checkout the desired branch (of the submodule)
git checkout master
# Pull from the tip of master (of the submodule - could be any sha or pointer)
git pull origin master
# Go back to main dotfiles repo root
cd ../../..
# Stage the submodule changes
git add vim/bundle/one-submodule
# Commit the submodule changes
git commit -m "Update submodule 'one-submodule' to the latest version"
# Push to a remote repository
git push origin master Now, if anyone updates their local repository from the remote repository, then
using AcknowledgementsInspiration and code was taken from many sources, including:
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论