Comments (11)
There isn't an easy way to do it. You could manually walk the revision tree and do git tfs checkin xxxxx
for each commit in your tree. But that would be a pain.
git-svn has a dcommit
command that I had
thought about replicating, but didn't. The basic mechanics aren't that
hard, I'm just not sure how to do the error handling right (e.g. what
if I cancel part-way through? does a rebase happen at each step?)
I'd be happy with a port of git-svn's
dcommit command.
from git-tfs.
Please take a look at this branch: https://github.com/ivan-danilov/git-tfs/tree/rebase-workflow
See details in my blog post: http://sparethought.wordpress.com/2011/06/21/gittfs-rebasing-workflow-is-it-possible/
It seems that it makes fine-grained workflow more or less painless. But I'm not sure if I did things correctly. Could you review my changes please?
from git-tfs.
I like.
I had a comment about the error message if the commit comes from the wrong branch that I made inline on one of the commits.
Also, what do you think about reworking it to be an rcommit command? e.g. git tfs checkin -r SOMEREF
would become git tfs rcheckin SOMEREF
?
from git-tfs.
My suggestion is to reserve rcommit to entire series of such checkins. So if we have tfs/default referencing HEAD^^ 'rcommit HEAD' would be equivalent to
$ git tfs checkin -r -m 'comment from git for HEAD^' HEAD^
now we have HEAD rebased and tfs/default = HEAD^ = changeset just checked in
$ git tfs checkin -r -m 'comment from git for HEAD' HEAD
If some conflict is happened - we just haven't other option then to leave last rebased state as it is and tell user the details.
I have been working with -r for about a week now and need to do this manually and enter comments twice was the only usability complaint so far.
As for your review - I'll make changes in 2-3 hours as soon as I'll be at home (there's just http read-only access to github from office unfortunately).
from git-tfs.
After some thinking... maybe it would be the simplest to have
a) '--no-merge' option for 'checkin' command that marks only previous TFS commit as parent but doesn't rebase
b) 'rcommit' command as described above
Thus, '--no-merge' is like plumbing option and 'rcommit' is porcelain one. I think such discretion will be easy to grasp for most git users.
What do you think about this?
from git-tfs.
ivan-danilov/git-tfs@de6c21c - exception and defensive check as you suggested.
from git-tfs.
The commit looks good.
As for the rcommit / no-merge idea, I like it. I think it will work well. (I would make it rcheckin instead of rcommit, though, in order to match the tfs language.)
from git-tfs.
Oh, yeah, you're right, rcheckin.
from git-tfs.
See branch. I've implemented rcheckin and --no-merge as we discussed earlier. It is even able to handle simple merges from other git branches. For example:
master: A [tfs/default;C1] <- B <- C <- D [merge commit, master ref]
branch: A <- E <- G [branch ref] <- D
Assuming merge commit has C as first parent and we are currently at refs/heads/master executing git tfs rcheckin
preserves the structure and makes B' = tfs/default/C2, C' = tfs/default/C3, D' = tfs/default/C4 and D' has two parents correctly (I marked with ' new commits that were fetched from TFS as they're different from original ones because of rebasing). Comments of B' and C' are taken from B and C, comment of D' is comment of D concatenated with comments of E and G (i.e. some form of summary of the branch merging).
The thing I don't like is that I reused CheckinOptions because it is the only way I found to specify comment in the TFS checkin. And it leads to having in help some options that doesn't make any sense for rcheckin. For example --no-merge or --comment. I'll see for your review and suggestion on that.
from git-tfs.
Are there some ideas to think/implement?
As far as I understand, we just physically can't make git commit and corresponding TFS-commit (result of git tfs fetch) equivalent as long as we have additional info in form of git-tfs-id: [url];proj;changeset_number
Current implementation with rcheckin
for series of commits and checkin
for single merge commit is the best I could see at the moment. So the question is: should we close this issue or there's still something we could do to improve the situation?
from git-tfs.
I think this is resolved.
from git-tfs.
Related Issues (20)
- Policy: Internal error in Work Items. Error loading the Work Items policy HOT 2
- How do I retrieve file history after clone? All I see is branch comments. HOT 7
- Adding work items to the export file doesn't work
- git-tfs not showing history showing error,"Please report this case to the git-tfs developers!" HOT 1
- New Release after v0.32.0 HOT 4
- Sudden authentication issue HOT 2
- Export map can't be created, if a TFS changeset shall be assigned to multiple commits
- Wrong branch cloned when several branch names starts in the same
- "git tfs" isn't a command, but "git-tfs" is a command HOT 1
- Error while cloning branches by using command. - git tfs clone https://TFSURL/tfs/defaultcollection/ $/ProjectName/Ressursstyring/src/next . --branches=all HOT 2
- How is v0.33.0 supporting Vs2022 as mentioned in the release notes? HOT 3
- Exclude folders from migration. HOT 2
- "GitTfs.Core.GitTfsException: Nothing to checkin!" on "git tfs rcheckin" HOT 5
- Cannot verify the migrated repository 'Unable to cast object of type ....' HOT 3
- Feature Request : Submit git-tfs to winget HOT 2
- .gitattributes ignored HOT 5
- I couldn't run them at first, but then managed to run Checkin Policies on VS2022 HOT 1
- Crash if no VS installed
- Case changing renames in TFS are ignored HOT 3
- How does --ignore-branches-regex work? HOT 7
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 git-tfs.