version-control

How does Git save space and is fast at the same time?

我是研究僧i 提交于 2019-12-17 21:45:31
问题 I just saw the first Git tutorial at http://blip.tv/play/Aeu2CAI. How does Git store all the versions of all the files, and how can it still be more economical in space than Subversion which saves only the latest version of the code? I know this can be done using compression, but that would be at the cost of speed, but this also says that Git is much faster (though where it gains the maximum is the fact that most of its operations are offline). So, my guess is that Git compresses data

What version-control system is most trivial to set up and use for toy projects?

百般思念 提交于 2019-12-17 21:40:24
问题 I teach the third required intro course in a CS department. One of my homework assignments asks students to speed up code they have written for a previous assignment. Factor-of-ten speedups are routine; factors of 100 or 1000 are not unheard of. (For a factor of 1000 speedup you have to have made rookie mistakes with malloc().) Programs are improved by a sequence is small changes. I ask students to record and describe each change and the resulting improvement. While you're improving a program

git repository sync between computers, when moving around?

本小妞迷上赌 提交于 2019-12-17 21:38:21
问题 Let's say that I have a desktop pc and a laptop, and sometimes I work on the desktop and sometimes I work on the laptop. What is the easiest way to move a git repository back and forth? I want the git repositories to be identical, so that I can continue where I left of at the other computer. I would like to make sure that I have the same branches and tags on both of the computers. Thanks Johan Note: I know how to do this with SubVersion, but I'm curious on how this would work with git. If it

Git history for branch after merge

六月ゝ 毕业季﹏ 提交于 2019-12-17 21:10:47
问题 I am a bit confused on how git stores history after merging. I have merged branch A to branch B successfully. Now, when I go to a file, in branch B , that was part of the merge I see all the history for that file for branch A but I don't see any history for branch B . Where has my history for that file for branch B gone to? The way I merged was through git merge <branch> so in this case, I was in branch B and used git merge A . For example, in branch A I had the following commits: a , aa ,

SVN: Track merges

十年热恋 提交于 2019-12-17 20:34:11
问题 Is it possible in SVN 1.6 to track where a commit was merged. I'm especially interesting in UI based solution (Eclipse plugin will be great). 回答1: I once wrote a quite web-page that kind of did this. I can't give you the page, unfortunately, but I can give you an idea of what I did. First our development model - all development made to trunk, revisions then get merged into various release branches for different versions of products. I set up a web page with a column for each version and a row

SCM choice for a new user? [closed]

强颜欢笑 提交于 2019-12-17 19:43:38
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . Real easy one here guys. Best justification gets the win. I'm a computer science student at a school you've heard of, and have been

Git - pulling changes from clone back onto the master

限于喜欢 提交于 2019-12-17 18:59:45
问题 I cloned a Git master and made a lot of changes on the clone. I have since committed these changes on the clone and now want the master to be a carbon copy of what is on the clone. I've tried Git push on the clone to push the changes to the master - but nothing I do updates the master. How can I make the master an exact copy of what is on the clone? What is the command workflow of updating the clone and having the master sync with the clone? 回答1: There are 2 kinds of git repository, bare and

Other consequences of `git push --force`?

好久不见. 提交于 2019-12-17 18:57:09
问题 Questions and answers about forcing a git push aren't hard to find (here are two). The standard answer goes something like this: If you have to force a git push , technically you can with the --force option, but procedurally you shouldn't because someone may have already pulled and somewhere a kitten will die. I see this as generally sage advice - the safer route is to just commit again, fixing whatever you broke. But let's say for example I know (magically) that no one has pulled the commit

Does git have anything like `svn propset svn:keywords` or pre-/post-commit hooks?

感情迁移 提交于 2019-12-17 18:45:56
问题 Browsing through the git documentation, I can't see anything analogous to SVN's commit hooks or the "propset" features that can, say, update a version number or copyright notice within a file whenever it is committed to the repository. Are git users expected to write external scripts for this sort of functionality (which doesn't seem out of the question) or have I just missed something obvious? Edit : Just to be clear, I'm more interested in, e.g., svn propset svn:keywords "Author Date Id

Subversion: How to merge only specific revisions into trunk when multiple consecutive changes are made in a branch?

风流意气都作罢 提交于 2019-12-17 18:35:31
问题 I have been using TortoiseSVN, svn, and subclipse and I think I understand the basics, but there's one thing that's been bugging me for a while: Merging introduces unwanted code. Here's the steps. trunk/test.txt@r2 . A test file was created with 'A' and a return: A [EOF] branches/TRY-XX-Foo/test.txt@r3 . Branched out the trunk to TRY-XX-Foo : A [EOF] branches/TRY-XX-Foo/test.txt@r4 . Made an unwanted change in TRY-XX-Foo and committed it: A B (unwanted change) [EOF] branches/TRY-XX-Foo/test