Storing git like commit history of changes
I want to build a git like versioning system for one my database entities.
The models would be:
modifier (added, deleted, modified)
An Entity is never really deleted so an user can undo a commit and end up with a valid state.
It sounds simple, but:
- A commit is generated on every click by the user (performance is very important)
- On every commit there will be about 100 changes (either modifications, additions or deletions)
Because we are just storing changes, the current state must either be calculated or stored.
Option 1: Saving the complete state for every commit would mean that I would not only store the modifications, additions and deletions in a commit, but also every entity that has not changed. I think this is not an really an option because there will be more than 20 million entities when the system is running.
Option 2: Calculating the current state by using a recursive common table expression. I don't know if this is fast enough...
Option 3: Performing a clean up after a certain period of time (like git gc). This would mean that I would actually delete all entities that are no longer valid at the time of the clean up. Not really an option because I want to be able to see all changes and go back to those changes.
Option 4: Use a graph database (neo4j)? Could it handle such a specifaction with reasonable performance?
Do you have any other ideas?
Let's say, my current git log is commit3 commit2 commit1 I reset the head to commit2. Now I want to go back to commit3, but I forget the sha-1 of commit3, so I want to look at the log , but git log
I had to delete a the last 5 commits from a local git repo, I did so by reset --hard to the new HEAD commit: git reset --hard abcde1 Now I need to remove those unreferenced commits from the history,
Can I go into a tag in git and make changes and repush that tag and new changes? I tried: git tags 0.2.0 0.2.1 git checkout 0.2.0 Then I made some changes and did: git add . git commit -a -m Clean
I have a bad commit from a log time ago, I want to remove it completely from git history as if it never happened. I know the commit id let's say 1f020. I have tried git rebase and remove it , but ther
What's the best way to move your last git commit back into the Changes not staged + Untracked files areas (with the commit in question being not-pushed / only in your local repo, effectively remov
I'm trying to commit some git changes but when I run: git commit -a it returns gvim -f: gvim: command not found error: There was a problem with the editor 'gvim -f'. Please supply the message using e
Is there an easy way to find the SHA1 of the first commit in a project with a long history with git?
I am currently working on a project which I periodically commit to the project Git repository on GitHub. Now I need to make major changes in this project without affecting the current release, so how
What are git commit generation numbers (hacker news link) and what are their significance?
How can I move a directory and files to a sub-directory along with commit history? For example: Source directory structure: [project]/x/[files & sub-dirs] Target directory structure: [project]/x/
I don’t understand git commit at all. It’s been a week since I’ve been using git and all these git with –a, -m, new files, untracked etc is making me totally confused. Tortoisegit is saving me for th
Occasionally I dropped a DVD-rip into a website project, then carelessly git commit -a -m ..., and, zap, the repo was bloated by 2.2 gigs. Next time I made some edits, deleted the video file, and comm
I'm a beginner with git and having some problems while trying to revert everything to the last time I committed. I don't mind losing any of the changes I just want to undo everything. I tried this: gi
The Problem I'm attempting to commit some changes, but they're being left behind, for reasons I do not understand: I take a look a the current repo state: % git status On branch new-master Changes to
git-notes is used to add or inspect object notes. How can I delete a git-notes commit, so the commit of git-notes command will not exist in git history. I want to delete git-notes commit, I'm not mean
I'm currently inside a very complicated merge in git, and I have many conflicts. The conflict is about two Ada source files. I would like to make a merge that would ignore both whitespace changes and
I am working with a friend on an iOS project, and we are using git for versioning, with Xcode. My friend has committed the changes, and I have my changes locally. When I try to commit my changes, I'm
So, we have master, and branch X which is up to date with master, plus some more commits. I've rebased master, changing history - squashing a few commits, rewording others. I then try to rebase branch
I have a commit that has made changes to files A,B,C,D,E. This commit has been pushed to a remote server. I would like to take the changes to files C and E and move them to a separate branch as they w
I want check changes in a specific file for a specific commit (by its SHA1). I have a SHA1 of a git commit - 16a75e59, in this commit several files was changed. I want check changes in only one of the
Is there any difference between git merge --no-commit and git cherry-pick --no-commit? And is there any difference in history if I commit after these two commands?
When I make changes to a file in Git, how can I commit only some of the changes? For example, how could I commit only 15 lines out of 30 lines changed in a file?
How i should use rebase for this case: I have 3 features in branches: feature/f1 feature/f2 feature/f3 and I have master branch: master I merge this 3 features into master branch. My commit history lo
I'm learning Git coming from Perforce. As far as I can tell you must write the commit message in the same step as when you commit. Or am I missing how I might write the message earlier and have it han
I'd like to use git to record all the changes to a file. Is there a way I can turn git 'commit' on to automatically happen every time a file is updated - so there is a new commit for every change to
I'd like to make a commit and close its branch, without removing it from history. With mercurial I'd commit --close-branch, then update to a previous one, and go on working. With git... I'm confused.
I want to know what difference(or rather advantage) does GIT gives when doing local commits (commit command) as compared to just saving the changes in the working directory in SVN when working offline
I want to publish existing git repository on github. I find it unnecessary to provide personal data within git commit logs (name, email). Nevertheless, I want to store history of changes. How do I str
A disgruntled developer who left a project sabotaged the git repository and I have now been brought on. I am unsure exactly what she did but here are the facts: There was a full commit history in git
Suppose you have: A-B-C Now your build/test fails. The fix should be merged in A. My current work-flow is like this: $ git commit -m fixA A-B-C-fixA $ git rebase -i A~1 And squash fixA in A, resul
I accidently deleted source directory.. I thought I was deleting another directory. But I have last commit that is where I need to revert back. I have two branches: master dev1 On dev1: git add . g
In the header of my source files I usually maintain a version history of this file, containing date of change and what has changed, sometimes the author, too. As I remember, CVS was able to update the
I'm attempting to learn, how to split commit in history. I use this page to guide me: http://git-scm.com/docs/git-rebase.html#_splitting_commits I have two commits, so I enter the git rebase -i <ha
I changed some files in my repo, but don't want them to be pushed public or create any temporary branch to store them. I just want to save these changes in somewhere. So which command is better: git s
I want to do something similar to git rebase but without collapsing parallel commits. Let's say I have the following commits: B (bar) / A-C-D (foo) Now I want to take the changes that D introduced t
i have a git repository which is my development Repository. I need to upload all changes on a weekly base to an svn repository - but I don't want to expose my git-commit-history. In other words: I exp
I made a changes for a file but didn't commit, and then I made a git reset --hard HEAD~1, is there anyway I can retrieve the content before the reset?
Is there anything I can do to automatically commit dropbox changes to github? (vice versa would be nice too but optional) I have tried Zapier however it didn't seem to want to work
I'm working in a branch, and got a working copy with is really unclean. When looking through the changes to commit, I wanted a few oneliner fixes to be committed to the master branch. In this case, us
My colleague has pushed to our git repository a mistake. I wish to commit some updated code, but I had not git pulled and as a result am 1 commit behind the HEAD. How can I ignore his changes complete
I have edited some files in working stage (not added them with git add -A. no commitment). Now I would like to revert the changes back to the last commit in my local branch. What is to do? I already s
I would like to restore a whole directory (recursively) from the history of my git repository. There is only 1 branch (master). I know the commit where errors were included. Can I use the sha1 hash of
I am trying to access commit history on a remote server on a particular branch and project...if I upload something from my local client I can see the commit history whenever I do git log,I read throug
I have a problem after git rebase. I did git commit, commit contains delete a file. So after that I did git pull and git has history of commits: ... -> My Commit -> Some Git commits came from re
I'm experimenting with new ways of tracking changes to my Photoshop files when I design and I'd like to know; is it possible to create a script which automatically creates a commit when a change to a
I would like to fetch a single commit (with history, of course) of a remote repository into a local one. Some Stack Overflow responses suggest that the following should work, but it does not: md foo c
When I view a git commit history in git gui, is there a way to use an external diff tool to show commit differences?
I am currently analysing a Git repo, and am trying to find out how code injected in a certain commit may evolve over time in subsequent commits. For example, given line 9 in commit 57176a..., what is
When I write a command line: git commit -m ™Initial commit™ I got an error: error: pathspec 'commit\342\204\242' did not match any file(s) known to git. How can i fix it?
I did a commit and reverted with git revert HEAD^ just git log ➜ git:(master) git log commit 45a0b1371e4705c4f875141232d7a97351f0ed8b Author: Daniel Palacio <email@example.com> Date: Tue Jan 17