How can I download the source of an overleaf project with a command line script? I want to make regular backups of the source and it'd be better if I could automate the download instead of having to do it through the web interface every time. I'm not aware of any API that would allow me to do that, is there any?
I know that an ideal solution would probably use git-overleaf integration for proper version control and that's what I do for my personal projects, but for some projects I have to work with collaborators who find git too confusing and do not want to enable the git features to avoid possible confusions between the git history and overleaf's history, so that's not an option.
You may want to look into scripts that download zip archive of your project, for example overleafv2-git-integration-unofficial
This python script will download zip of your project, extract it, and delete the zip. It offers basic git functionality albeit largely experimental.
Sample usage:
overleafv2-git --email=your#email --password=yourpass --message="commit message" project-URL
My friend and I are creating an app and we are wondering if there is a way where we can both edit the code at the same time?
Don't use SVN. You will see how easy version control could be and later everywhere on the job people will use Git because it is "better" and you will get frustrated.
Just use Git from the beginning, stay happy, you will love it. Really! 😏
The default in Xcode is Git too, so it can't be wrong.
Just be aware that the interface in Xcode is offering you a filtered version of the Git commands. As soon as you really need it for anything you will end up on the command line.
Whatever you try there, the first few times it will fail until you have learned the propper syntax and all side effects. So just make a copy of the folder, or zip or tar it before you try it a simple git command.
Also SourceTree is nice, but same problem there, learn what every command really does.
Use git! Lets people edit code and track the progress of the project (among many other useful tools).
Git Tutorial
If you are looking for more of a 'Google Docs' atmosphere, I would look into Codr or Cloud9
You can use SourceTree a free git repository handler.
At work we are using TFS Team Foundation Version Control (TFVC) and the workspace is a server workspace (very large codebase). The limitations of our setup are that files checked out are locked for edit by other people. Also there is a culture of not committing until work is complete etc as many change-sets complicate merging later.
I am in no position to change the global rules or culture. I would like to locally setup a mercurial (hg) repo on my local machine. The idea is that I can work on my local copy make as many checkins to hg. When I am done I would like to bundle my changes into one changeset and send it off to the TFS location (also on my local machine). Then immediately checkin the changes to TFS server.
That way to the outside world I appear to checkout and then immediately checkin all of my code, only briefly locking the files changed. But locally in hg I get the full ability to make small checkins and work without worrying about locking files out for edit.
Somehow chain two version control systems, giving me the flexibility of HG locally, but continue using the global TFVC for final checkins.
Any ideas on how this could be achieved?
You can use git-tf and the hg-git. This was an intentional design decision when we built git-tf that this was a supported scenario.
That said... this seems a bit... icky.
You may want to write a few shell scripts to make this workflow a little bit easier.
But even with that, it's hard to imagine troubleshooting this when something inevitably goes wrong.
TFS doesn't have Mercurial support, but apparently does have Git support.
You can use the hg-git plugin to access TFS this way.
More details about the lack of support:
https://hglabhq.com/blog/2014/1/17/mercurial-support-in-tfs-declined
https://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/3607357-add-mercurial-support-to-team-foundation-server
What will I actually miss if basing my source code handling on TFS (to get all the integration and reporting etc) but use git-tf or git-tfs locally?
Will I then be able to use the complete git functionally to branch and merge locally just as if used a git based central repository, or will there be a different workflow and limitations to consider?
We use feature and release development branches a lot and like to keep doing so, how does actually the TFS server handle this when pushing these locally using git-tf etc?
Actually, git-tfs is more advanced than git-tf. I highly advice to use it instead of git-tf (for the moment).
With git-tf, you should clone each branch as a repository (and be unable to cherrypick, merge...) while in the last version of git-tfs you can do it and keep your workflow.
See https://stackoverflow.com/a/13710811/3619
If you know git there is not problem to use git-tfs!
The documentation : https://github.com/git-tfs/git-tfs/blob/master/doc/
just know that if you use :
git tfs checkintool
or :
git tfs checkin
it will create a merge commit
and if you use :
git tfs rcheckin
it will commit each local commit in tfs and fetch and rebase automaticaly on these commits...
But read the wiki documentation, it's clear enough ;)
edit:
Contrary to what #gbjbaanb said, there is a lot of advantages of using git-tfs instead of plain TFS (if you know how to use git...). ALL what you could do with git locally works and is still an advantage (light branching, rebase, local commits, reworking commits, knowing exactly which version is checkouted, fetching and seeing changes WITHOUT merging them with your current workspace, better history,...).
Now with git-tfs, you could even create more easily than with TFS a TFS branch (you just have to create it before doing a commit in it, or rebase onto after creating it if you began your work in a git branch before... ).
The only thing that is not better than TFS, for the moment, is merging 2 TFS branches that is not supported. You should either do a merge with TFS if you want to see the merge in your history (what we generally want) or merge with git and checkin in tfs (and you won't see the merge changeset :( ).
A pull request[1] to resolve all this (and permit to manage merge commit a LOT easier than with TFS) already done and waiting for merge in the trunc (I have just to refactor Unit test and the feature be reviewed).
[1] https://github.com/git-tfs/git-tfs/pull/363
If you use git-tf (the MS version) firstly you will have to understand the commands you use will be different - they stuck an additional "tf" in every command. (eg git tf push)
The second is that branching will not work like git - I found (and this could be due to security setups and suchlike, even though I can create branches locally and on the server) that whilst you can branch your local git setup, you cannot push a new branch back to the server - you have to merge it onto an "offical" branch first.
If using TFS, I wouldn't bother trying to use any of the bridges (though svn-tfs bridge is very close due to the nature of TFS being close to SVN). I'd use the native client. I wouldn't choose TFS first though, but if that was what I had to use - the Team Explorer Everywhere client would be my choice.
Which version control system should I use for a Rails app: Git or SVN?
Here are some factors to consider:
I'm the sole developer
I'm familiar with SVN
I've only used Git for a week, it seems pretty similar to SVN really.
I want to put my repository on a remote location and connect to it via SSH or other protocol (which I already do with SVN).
Edit: Thanks for the responses so far. It seems like Git is slightly more favoured. Does it have any SSH functionality?
I'd say go for Git. Mostly because I'm biased, but also because you don't need to setup any sort of server with Git, you just git init and go. Git is generally just better, it provides more flexibility and power than SVN does.
Edit: This is a bit of a dupe of Why is Git better than Subversion, or at least relevant.
Edit2: Git has 3 primary methods of communication, the Git protocol, SSH and HTTP. Github uses SSH for "push access", e.g., git#github.com/user/repo.git.
As a single developer who is already familar with SVN - if you want to be as productive as possible use SVN.
If on the other hand you really want to learn GIT and can afford a bit more time to learn it, use GIT.
Use Git, if for no other reason than that you can use it almost exactly like SVN (including remote management of multiple branches over SSH) and it's much, much faster and more reliable. Local checkins and branches, distributed version control, revision history management, etc. are only side benefits.
In my experience the only reasons to prefer SVN over Git are: a legacy SVN repository, or the requirement to use Windows on the client.
I would have replied in comments but I can't, yet.
For those who don't know, Git work with Windows. If you don't like the msys's version, TortoiseGit is already usable.
Since you're solo and want to put it on a remote location: SVN, but you should learn/use Git as well. You could also combine the two, use Git locally and SVN for the remote..
It's probably a good idea to use some sort of version control. It's also probably a good idea to have remote backups of your code.
Git and svn are both good version control solutions and are both popular within the Ruby/Rails community.
If you were in a distributed development group I'd suggest git might be more appropriate since one of its specific design goals was for that situation.
If you were on Windows, I'd hint that TortoiseSVN probably provides a less challenging experience than, say, msysGit.
Mostly, though they both seem to do a similar job and do it well.
If you specifically want to learn a new source control system while building your project, go for git. Or if you intend spending a lot of time in, for example, edge Rails, which lives at Github, again might as well go for git.
Otherwise I'd say you should stick to svn.
If you have a day to learn Git, then learn Git. It has all the functionality that svn has, plus cheap branching/merging, local commits, and the option of distributed development.
It is easy to work with remote repositories. If you're just looking for some kind of public hosting, then you might want to look at Github, which has free public hosting, good Ruby integration, and many pretty graphs.
I'd say there's no particular difference.
Both systems are just tools, and both of them will provide you with with the functionality you're looking for. If there's no other parameters to consider, I'd say go with SVN as you already know it and you don't need time to learn it.
I'd add one follow-up question: are you working on this alone? The GUI tool support for Git is generally lagging that of Subversion, so if that is or might become a consideration, then I would opt for Subversion.
For example, if your designers use Adobe CS4, they can use its built-in Subversion support (and you don't have to teach them Git). So consider the current and future composition of your team as a factor in your decision-making.
I used to love git, but have recently switched to mercurial. It has exactly the same syntax as git, but is written in python, and has lots of nice bells and whistles out of the box, like a web server for visual tracking of commits.
I know that this can be set up for git using gitweb for example, but it requires a bit of work.