Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I would not dirty your control version system with such series of auto commits. But I agree with the idea of using a control version system to provide that information.</p> <p>Then, my suggestion is: use a repository for your software and another one for store the auto commits. When the work is done, merge all auto commits in the main repository in only one logical commit.</p> <p>With git, I would do this:</p> <ol> <li>Repo 'foo': the main repository <ol> <li>refs/heads/...: the location of your development branches</li> <li>refs/sessions/...: the location of your work with dirty commits.</li> </ol></li> <li>Your working copy: <ol> <li>"git init"</li> <li>"git remote add foo git://foo/...; git fetch foo"</li> </ol></li> <li>create the branch: "git checkout -b bar foo/master"</li> <li>tag the begining of the branch: "git tag barbegin"</li> <li>activate the script: "while true; do git add -A .; git commit -m 'autocommit'; done"</li> <li>I would not use a cron job, so you can activate/deactivate the autocommits easily.</li> <li>do your job</li> <li>after your job done, deactivate the script</li> <li>commit pending changes</li> <li>now, you have a lot of auto commits in branch bar, and you have tagged the initial commit of the branch with barbegin</li> <li>publish your auto commits: <ol> <li>"git tag barend"</li> <li>"git push foo barbegin:refs/sessions/your user id/the session id/begin"</li> <li>"git push foo barend:refs/sessions/your user id/the session id/end"</li> </ol></li> <li>now, you have published your work and your lecturer may access it</li> <li>for update your foo repository: <ol> <li>"git rebase -i --onto barbegin barbegin" and proceed as described <a href="https://stackoverflow.com/questions/250238/collapsing-a-git-repositorys-history/251927#251927">here</a></li> <li>I would squash all commits: "in the end, there can be only one".</li> <li>"git push foo bar:master" # only one commit will be pushed</li> </ol></li> <li>cleaning: <ol> <li>"git tag -d barbegin"</li> <li>"git tag -d barend"</li> <li>"git branch -d bar"</li> </ol></li> </ol> <p>After all this, I think no useful information may be gathered with such kind of data. So, I would try to avoid this workflow. But if really needed, I would do that way.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload