New Git repositories start out without any branches, but the HEAD
reference points to "master" by default. This means that the first
commit will create a master branch.
This change adds a HEAD file to the Git template with a different ref.
This means that new repositories will commit to a "main" branch by
default instead.
The HEAD file is added to COPY_ALWAYS, because Git's HEAD must be a
regular file and not a symbolic link.
In f252ba4 we lost some of the functionality of `git-up`. This change
brings back rebasing against the origin's reference and not the local
reference of the main branch. We also explicitly fetch from `origin` now
to be sure we're current before rebasing.
Close#671
In [a previous commit], we removed the fetching of the "origin" remote
from the "up" Git function. With this change, developers had to fetch
manually before rebasing their branch. We added the fetch back into the
"up" Git function.
[a previous commit]: f252ba46d1 (diff-b973d5fb5d66981ace5c069881095355)
There's been a recent movement to rename the "master" branch in git
repositories to "main" to avoid to potentially problematic word
"master". Our `merge-branch` script was hard coded to "master". This PR
makes it possible to pass in the name of the branch you wish to merge
to. I've defaulted it to "master" for now, but I expect in time this
will change.
Our team is renaming the base branch of our application from `master` to
`trunk`. I had held off on doing this in the past because `git up -i`
has become such an huge muscle memory thing and I didn't want a script
to only work on some of my frequent repositories.
This [trick from Stack Overflow](https://stackoverflow.com/a/49384283/1190970)
shows how to grab the name of the primary branch for a remote branch without an
expensive git operation. It'll allow a rebase against the tip of the primary
remote branch regardless of its name.
asdf has a very useful configuration setting called
`legacy_version_file`. When it is set to `yes`, asdf will read the
version files used by other version managers (e.g. `.ruby-version`) in
addition to asdf's own `.tool-versions` file. This makes the migration
to asdf much smoother, as many projects only specify these 'legacy'
dotfiles for versioning.
Documentation: https://asdf-vm.com/#/core-configuration?id=homeasdfrc
Closes https://github.com/thoughtbot/dotfiles/issues/654
People may wish to configure a `commit-msg` hook in their local
dotfiles.
This allows them to do so by adding a [`commit-msg` git hook][1] that
checks for the presence of a local `commit-msg` hook, and runs it if
present. This hook follows the existing pattern we use for other git
hooks.
[1]: https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks
Summary:
This change addresses an error that occurs when we've instructed vim to
reference the wrong path for an existing FZF executable.
Additional Details:
In the previous approach, when checking if FZF has already been
installed, we make the assumption that if FZF is `executable` it was
installed via Homebrew. Then, based on that assumption, we set vim's
`runtimepath` to reference the directory where Homebrew creates symlinks
for installed packages (`/user/local/opt`).
Because of this assumption, anyone that has FZF installed in a different
directory, and available as an executable in their $PATH, attempting to
use FZF within vim will result in an error. The reason vim errors is
because `Plug` has instructed vim's `runtimepath` to look in the wrong
location for FZF (in this case, we told vim to look for FZF within
`/user/local/opt` when the FZF executable lives somewhere else).
The revised approach still attempts to find an existing FZF package
before proceeding with installing FZF.
Summary:
Using CtrlP has proven to be slower and has fewer features. We've been
switching over to FZF on a frequent enough basis that it feels
appropriate to make FZF the new default for fuzzy searching.
By swapping out Ctrlp in favor of FZF, this should not break anyone's
fuzzy search but it will replace the tool that executes the search.
Co-authored-by: Chris Toomey <chris@ctoomey.com>
from man
>If the session name is prefixed with an ‘=’, only an exact match is accepted (so ‘=mysess’ will only match exactly ‘mysess’, not ‘mysession’).
With the popularity of Babel and ES6, it seems like Coffeescript is no
longer a standard, frequently-used part of the thoughtbot toolset. This
change removes the vim-coffeescript plugin from our default set. Users
who want to retain it can add it back to their `vimrc.bundles.local`.
It checks the home directory location and the default Homebrew location
before falling back to `brew --prefix` (Sloooow!)
This also accounts for non macOS systems that don't have Homebrew.
As of tmux 1.9, the `-bg`, `-fg`, and `-attr` options were condensed
into a single `-style` option, which takes a comma-separated list of
options.
In tmux 2.9, the old options were fully removed.
See https://git.io/fjR7c for more information.
Currently [Homebrew implements analytics] as opt-out, forcing it on its
users without their enthusiastic consent or a full understanding of the
implications.
This changes it to opt-in: we opt-out by default, and to opt in to
Homebrew analytics we can override it in `~/.zshrc.local`:
```sh
unset HOMEBREW_NO_ANALYTICS
```
[Homebrew implements analytics]: https://docs.brew.sh/Analytics
- Use the `~` glob operator to exclude *.zwc insead of a separate test
(requires `setopt extendedglob`).
- Exclude both `pre` and `post` in one case alternative.
Set `updatetime` option and `g:ale_lint_on_text_changed` variable in an Vim startup autocommand so that they won't be set when the user disables the `ale` augroup (with something like `silent! augroup! ale` or `augroup \ autocmd! \ augroup END`) in their local vimrc.
This allows users to use ALE with its default linting settings without needing to manually `unlet` the `updatetime` option and `g:ale_lint_on_text_changed` variable also.
I started getting errors after a recent Vim upgrade because of line:
`set list listchars=tab:»·,trail:·,nbsp:·`
Adding UTF-8 encoding fixes it.
```text
:h encoding
NOTE: For GTK+ 2 or later, it is highly recommended to set 'encoding'
to "utf-8". Although care has been taken to allow different values of
'encoding', "utf-8" is the natural choice for the environment and
avoids unnecessary conversion overhead. "utf-8" has not been made
the default to prevent different behavior of the GUI and terminal
versions, and to avoid changing the encoding of newly created files
without your knowledge (in case 'fileencodings' is empty).
```
I like this `bin/replace` script, but I've recently switched from `ag`
to [ripgrep](https://github.com/BurntSushi/ripgrep). This checks for the
presence of `rg` and uses it in `bin/replace`, passing the correct
parameter to disable colors.
Per @andyw8 in #588:
https://github.com/ggreer/the_silver_searcher/wiki/Advanced-Usage
`agignore` is now deprecated as the place to declare ignored files for
search. We'll put these files into `gitignore` rather than `ignore` so
that we have consistently ignored files between ag, git, etc.
Recommended by @croaky:
bcfa239b31Close#588
This change leverages the existing `gitcommit` syntax rules to apply the
same formatting and highlighting settings to pull request messages when
they are edited from Vim.
The Github `hub` utilty has added a `pr` subcommand, which takes
precedence over `git-pr` in execution order, so this script is no longer
accessible with `git pr` or `hub pr`.