tig path_to_file_or_files_or_path_with_wildcard
It’s pretty common for projects hosted on GitHub to receive “pull requests”: requests from people who have cloned your project, made a modification to it and then asking you...
...good time to upgrade our deployment process. Currently pushing out a new version of GitHub takes upwards of 15 minutes. Ouch. My goal: one minute deploys (excluding server restart time...
...the branch name from Linear (keyboard shortcut Ctrl-Shift-.). Branch off the main with: git checkout main git checkout -b $PASTE_BRANCH_NAME_HERE If your feature depends on another...
...merge request checklist: Within your feature branch, merge the current main and push using: git pull origin main git push -u origin feature-branch-name You're encouraged to use...
...deploy new features but the latest commits are not ready for production? Then use git merge master~n to skip the n-last commits. Tip A big advantage of merging...
...duplicate commit messages in your history. Example It's time for a production deployment! git log --pretty=format:"%h - %s" --reverse origin/production..origin/master 0e6ab39f - Feature A 6396de5f - Feature B...
...all minor and patch updates. Examples Bad source "https://rubygems.org" git_source(:github) { |repo| "https://github.com/#{repo}.git" } ruby "2.7.6" gem "rails", "~> 7.0.6" gem "sqlite3", "~> 1.4"
...remove this version constraint afterwards again. Good source "https://rubygems.org" git_source(:github) { |repo| "https://github.com/#{repo}.git" } ruby "2.7.6" gem "rails" gem "sqlite3" gem "puma"
...Make an initial commit with Linear ID and the name of the issue using git commit --allow-empty -m Read the complete issue Reread the complete Issue and check if...
...the merge request Within your feature branch, merge the current master and push using: git pull origin master git push -u origin feature-branch-name You're encouraged to use...
tig is a command line explorer for Git that is just awesome. Install via apt-get or brew. Handy commands t ("tree"): Directory-structure based access. You'll see the...
...with the commit list filtered to those that touched the given file(s). Interactive Git status. Run tig status. Stage/unstage with U, navigate with ENTER/Q. Stash management. Call tig stash...
...included in diff Another is that now they will always be included in your git diff for merge requests. There are two options how you can address this:
...exclude from diff Luckily gitlab comes with a solution for this. You can ignore files for diffs within a project specific .gitattributes files like shown here: tmp/parallel_runtime_rspec.log -diff knapsack_rspec_report.json -diff...
Git has the concept of hooks: bash scripts that are invoked at certain points in the Git lifecycle. One handy use is a pre-push hook that runs Rubocop. It...
...will prevent pushing code that Rubocop finds fault with. Configuring the hook Git hooks are normally stored locally with a repository. They are not committed. Store this snippet in .git/hooks/pre-push...
The linked GitHub repository is a bit like our "dev" cards deck, but groomed from a single person (Josh Branchaud). It includes an extensive list of over 900 TILs on...
...many topics that might be interesting for most of us. (e.g. Ruby, Rails, Git, Unix..) Ruby Here is an excerpt of all the Ruby TILs that were new to me...
...install once more Option 3 This should always work. Run bundle update GEMNAME Run git diff Gemfile.lock and notice all the updates you didn't want Revert the unwanted changes...
...other locked gems, it will fail. If you use this option, be sure to git diff your Gemfile.lock to see if the changes are what you expected...
Sometimes you want git to ignore certain files that appear on your machine. You can do this in 3 ways: Per project, in the project's .gitignore file
...in a local exclude file Globally on your machine Downsides of per-project .gitignore entries While it might be tempting to set it per project (other devs might benefit from...
...and the programmed CLI tool. The code has been published for educational purposes on GitHub. The german bachelor's thesis has also been included for download at the end.
...called, the gem Rugged is used to read out the changes as listed in git status, which is sufficient since only file based coverage is used. After that the data...
...they will set it to "Review" on Linear and open a merge request on GitLab. You will receive an e-mail. Now review the code, either directly on GitLab, or...
...it into main yourself: Squash and merge into main Push Delete the branch with git push origin :feature-branch-name Set the corresponding issue to "Merged" Deploy to staging
...in any circumstances, you may permit it. Ask someone if you are not sure. Github license pages or tldrlegal.com give a good overview about a license's permissions, limitations and...
Rubygem ntlm-http: bundle exec license_finder licenses add ntlm-http ruby --why https://github.com/trampoline/ntlm-http/blob/9a61eaf20bd93ba035c17a79df0e9c814ffe6f2e/lib/net/ntlm_http.rb Adding a hidden dependency Sometimes there may be a dependency the package manager...
...maybe just one!) commits. Each of them should have a green test suite - otherwise git bisect will not work reliably. Remember: if you for some reason have to detangle functionality...
...first ., \H: full hostname \w: current working directory, \W: same, but only the basename $(__git_ps1 "%s"): your current git branch if you're in a git directory, otherwise nothing...
...by writing export PS1='...' to your .bashrc or .profile. Examples export PS1='\h \w$(__git_ps1 "(%s)") \$ ' => mycomputer ~/apps/chess/tmp(master) $ _ export PS1='\[\e[33m\]\h\[\e[0m\]:\W\[\e[33m...
...has a lockfile (yarn.lock) with exact version numbers. The lockfile should be checked into Git. You never touch the lockfile by hand. You change it with a yarn command instead...
...to install the gem locally on your system and then override the version from git: cd ~/gems/spreewald rvm use 2.5.1 # or rbenv local 2.5.1 # use the ruby version your project...
Just run git show branch:file. Examples: git show HEAD~:bin/command git show origin/master:../lib/version.rb
...Guard starts, but we'll take care of that in the next step. Configure git As mentioned above, the esbuild_error_development.txt file must exist for Guard to watch it. [1]
...Git does not offer a way to add a file and ignore further changes, at least not in a way where this information is shared with the upstream repo. With...
Popular command line tools (>= 4 mentions) tig (17 users) Command line UI for git. htop (10 users) An improved "top". fzf (8 users) Provides super-fast fuzzy-finding in...
ag (the silver searcher) (4 users) A much faster grep, that honours your .gitignore. ripgrep (4 users) Another much faster grep, also honouring your .gitignore. bat (4 users)