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

Can you reuse the cloned repository directory with Squit? #352

Closed
LinqLover opened this issue Nov 8, 2021 · 6 comments
Closed

Can you reuse the cloned repository directory with Squit? #352

LinqLover opened this issue Nov 8, 2021 · 6 comments
Labels

Comments

@LinqLover
Copy link
Contributor

Is it possible or recommended to connect the same local git folder to Squot in multiple images, given that Squit is not actively used simultaneously in both images? And can I also use the same directory with my local git client (outside of Squeak) at the same time? Or might any of these attempts result in unexpected failures and data loss and stuff? :-)

@j4yk
Copy link
Collaborator

j4yk commented Nov 8, 2021

I have used a single disk repository since the beginning of Squot. Multiple copies of my working image, and some clean trunk images have been working on this repository. And the Git command line since fetching is too costly for me due to #34.

The only problems I had was in early 2017 when FileSystem-Git still had some bugs, which got the repository slightly corrupted at times. But I have not seen such problems or heard of them in the last three years.

Be aware though that if two images have the master branch checked out, the image in which you did not commit the last time will be "behind" the head of the branch and there is no indication of that. You can use "Merge objects" in this case, but you have to know yourself whether or not you have already done it.

@j4yk
Copy link
Collaborator

j4yk commented Nov 8, 2021

In case you do not know how to achieve this: just use "New project" > "Add new project" and choose the working directory or .git directory. If there is already a repository there, it will just pick it up (but not check it out yet).

@LinqLover
Copy link
Contributor Author

Thank you very much, that answered all of my questions! :-)

@LinqLover
Copy link
Contributor Author

If I do git status in the git folder that has been used to commit, pull, push etc. as usual from a Squeak image, it shows me gazillions of deleted files (most likely every file in the repository) under "Changes to be committed". What am I supposed to do with these files if I would like to check out another branch using the CLI? Is it fine just to check them out (git checkout -- **/* && git reset HEAD **/* && git clean -f)?

@j4yk
Copy link
Collaborator

j4yk commented Nov 14, 2021

I usually git reset --hard before anything else in the CLI of my Squot repository. You can also try git checkout -f. You must be aware of this of course if you want to edit files outside of Squeak. Better do not commit in parallel also from Squeak.

@j4yk
Copy link
Collaborator

j4yk commented Nov 14, 2021

The cause is that Squeak may update the checked-out branch of the disk working copy, but it will not update the files of the disk working copy, and also not the index. So if you look at the disk working copy again to Git it looks like you have reverted all the changes of the commits that happened in the meantime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants