Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop rsync dependency #31

Closed
jcbhmr opened this issue May 16, 2023 · 1 comment · Fixed by #40
Closed

Drop rsync dependency #31

jcbhmr opened this issue May 16, 2023 · 1 comment · Fixed by #40
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@jcbhmr
Copy link
Collaborator

jcbhmr commented May 16, 2023

We can use GIT_DIR and GIT_WORK_TREE to make the .git folder be somewhere completely different and the worktree root (the part where the files are to commit) be somewhere completely different too.

export GIT_DIR=/tmp/my.git
export GIT_WORK_TREE=my/subfolder

git init -b master
git add -A
git commit -m 'Add files!'

https://git-scm.com/book/en/v2/Git-Internals-Environment-Variables

@jcbhmr jcbhmr mentioned this issue May 16, 2023
12 tasks
@jcbhmr jcbhmr changed the title No longer using rsync to put files into a git repo. Instead, we use $GIT_WORK_TREE to move the git worktree to the files, not the files to the git worktree! 😲 Drop rsync dependency May 16, 2023
@jcbhmr
Copy link
Collaborator Author

jcbhmr commented May 16, 2023

Related to spenserblack/actions-wiki#72

@jcbhmr jcbhmr self-assigned this May 16, 2023
@jcbhmr jcbhmr added the enhancement New feature or request label May 16, 2023
@jcbhmr jcbhmr added this to the v4 milestone May 16, 2023
@jcbhmr jcbhmr mentioned this issue May 16, 2023
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant