zImage
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
codeinabox@programming.dev to Git@programming.devEnglish · 3 days ago

Use skip-worktree to ignore modified files

www.brandonpugh.com

external-link
message-square
0
fedilink
6
external-link

Use skip-worktree to ignore modified files

www.brandonpugh.com

codeinabox@programming.dev to Git@programming.devEnglish · 3 days ago
message-square
0
fedilink
Today I learned about the --skip-worktree command in git which will treat a file like it hasn’t been modified. This is useful if you have to modify a file locally but don’t ever want to commit it (config files are a common scenario). Like me, you may have seen --assume-unchanged used in this way but that’s not what it’s meant for since it’s “designed for cases where it is expensive to check whether a group of files have been modified”. As a result you’re likely to lose the changes you have made to those files. This post shows a good summary of the outcomes of common operations with each command.
alert-triangle
You must log in or register to comment.

Git@programming.dev

git@programming.dev

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !git@programming.dev

Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.

Resources

  • Official Git project site
  • Pro Git book

Rules

  1. Follow programming.dev rules
  2. Be excellent to each other, no hostility towards users for any reason
  3. No spam of tools/companies/advertisements. It’s OK to post your own stuff part of the time, but the primary use of the community should not be self-promotion.

Git Logo by Jason Long is licensed under the Creative Commons Attribution 3.0 Unported License.

Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 16 users / day
  • 82 users / week
  • 91 users / month
  • 248 users / 6 months
  • 1 local subscriber
  • 3.92K subscribers
  • 278 Posts
  • 832 Comments
  • Modlog
  • mods:
  • Ategon@programming.dev
  • canpolat@programming.dev
  • Jason Novinger@programming.dev
  • UI: unknown version
  • BE: 0.19.12
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org