Comments (10)
Does running git add -A
afterwards fix the issue? It's difficult to use git mv
, etc, instead because of the way synx builds out the reorganized project.
from synx.
Sort of. Adding the files to the repo doesn't end up being much of a pain point. The pain point is preserving file integrity so that history stays the same.
Having spent a lot of time doing these sorts of things in the past, the real pain is really in the git/svn/perforce moves. You end up having to do those manually, which is super tedious and time consuming. Being able to automate that with a tool would be hugely valuable.
from synx.
Ah! Yeah, that makes sense. The way synx
works right now is that it builds out your new project structure in a temporary directory, and then replaces your current project with it once it's done. This makes the whole process a lot cleaner than trying to do it in-place.
Obviously, this makes doing the git move
stuff hard, but I agree that it'd be nice.
from synx.
Awesome :)
I agree this is no easy task, but it would definitely be a huge value add for the tool!
from synx.
AFAIK git mv
is no different then removing a file, moving it and adding it at a new place (that is, if there are not simultaneously severe content changes in it).
Can't find a better source unfortunately to back this up than this link:
http://stackoverflow.com/questions/433111/how-to-make-git-mark-a-deleted-and-a-new-file-as-a-file-move
So, if you commit all changes before doing the cleanup (which would make sense anyway) then you should be fine.
from synx.
Interesting, that does appear to work as you describe. Git detects it as a rename.
from synx.
@mickeyreiss described to me one situation where it'd be different.
Let's say you have files at path A and B. If you swap their paths, it will actually think that you changed the contents of these files, rather than moved them around. Sort of an edge case, though, and I don't really see it happening outside of cases where you've just done a major bulk sync.
from synx.
As far as I know GIT doesn't store any metadata regarding wether a file a has been renamed. It is inferred from the commit.
@marklarr thanks for the awesome work, this has been in my TODO list for ages!
from synx.
Thanks @irrationalfab :)
Are we comfortable closing this issue?
from synx.
I found synx may work well for git, but it does not work for svn. After moving files, all svn histories will be lost.
Therefore I wrote a script to bridge "svn mv" so that it is possible to preserve svn histories.
For those using SVN, you may want to take a look at this script: https://gist.github.com/haojianzong/5ab0ce86725f3785154d
from synx.
Related Issues (20)
- Crash report: Errno::EEXIST
- Have the synx work in oposite direction as well? HOT 1
- Swift Scripting HOT 2
- Synx can irreversibly remove all your files HOT 1
- *.xcassets files was removed HOT 2
- Not work HOT 1
- Trunk whole path in filename
- Feature request: exclude files HOT 1
- Xcode 8 name
- synx error happens HOT 1
- running synx with --no-color fails and deletes all the files
- Is it possible to separate convert logic into a couple of steps?
- Synx removes empty folder HOT 1
- Sorting isn't localized (ZZ sorts before aa)
- GUI Wrapper App
- Removing bridging header file from project HOT 2
- Since using Synx Xcode Assistant no longer works
- support Mojave in different configurations
- [SPM] The problem with incorrect interaction with Swift Package Manager HOT 3
- Please add me as a contributor to the project HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from synx.