tj / tj/git-extras

git sync exclude folders from clean

Open
#660 11 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Shell
Stars
18.1k
Forks
1.2k
Avg merge
5d 17h
Merged PRs (30d)
1

Description

Hi, I've taken a look at the git sync command and was wondering if it would be possible to prevent some folders from being cleaned out.

node_modules or .idea/ are good examples of important folders that I would need to keep locally. A simple first step might be to have an extra read that asks for a full clean or just clean without the -d.

I would make a PR, but I want to gauge interest in this, and I apologize if I'm duplicating but I didn't find any similar issues in my search.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with bin/git-sync around line 68 and inspect how it invokes git clean. Compare the proposed full-clean versus cleaning without -d behavior, including the node_modules and .idea/ examples, and review the discussion for an agreed direction. Done means the accepted behavior for preserving local folders is documented and implemented in git-sync.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, shell
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.