summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-12-10 12:33:48 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-12-10 12:33:48 -0400
commitd6fafc463e5335ed515c45ebff2454c795323e3f (patch)
tree39e0afbe490e3b6d8bf7e28292701bf5fed096d6
parenteecaf424856e42290d653e0b4b4043665da18b00 (diff)
parente0e9d1cabd0aca52aa410be37de7251533b5e237 (diff)
Merge branch 'master' of ssh://git-annex.branchable.com
-rw-r--r--doc/forum/pure_git-annex_only_workflow.mdwn46
-rw-r--r--doc/forum/pure_git-annex_only_workflow/comment_1_a32f7efd18d174845099a4ed59e6feae._comment32
-rw-r--r--doc/forum/pure_git-annex_only_workflow/comment_2_66dc9b65523a9912411db03c039ba848._comment15
3 files changed, 93 insertions, 0 deletions
diff --git a/doc/forum/pure_git-annex_only_workflow.mdwn b/doc/forum/pure_git-annex_only_workflow.mdwn
new file mode 100644
index 000000000..36648a905
--- /dev/null
+++ b/doc/forum/pure_git-annex_only_workflow.mdwn
@@ -0,0 +1,46 @@
+I’m using git annex to manage my movie collection on various devices – my laptop, a NSLU tucked away somewhere with lots of space, some external hard drives. For this use case, I do not need the full power of git as a version control system, so having to run "git commit" and coming up with commit messages is annoying. Also, this makes sense for a version control system, but not for my media collection:
+
+ $ git annex add Hot\ Fuzz\ -\ English.mkv
+ add Hot Fuzz - English.mkv (checksum...) ok
+ (Recording state in git...)
+ $ git commit -m 'another movie added'
+ [master 851dc8a] another movie added
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+ create mode 120000 00 Noch nicht gesehen/Hot Fuzz - English.mkv
+ $ git push jeff
+ Counting objects: 38, done.
+ Delta compression using up to 2 threads.
+ Compressing objects: 100% (20/20), done.
+ Writing objects: 100% (26/26), 2.00 KiB, done.
+ Total 26 (delta 11), reused 0 (delta 0)
+ remote: error: refusing to update checked out branch: refs/heads/master
+ remote: error: By default, updating the current branch in a non-bare repository
+ remote: error: is denied, because it will make the index and work tree inconsistent
+ remote: error: with what you pushed, and will require 'git reset --hard' to match
+ remote: error: the work tree to HEAD.
+ remote: error:
+ remote: error: You can set 'receive.denyCurrentBranch' configuration variable to
+ remote: error: 'ignore' or 'warn' in the remote repository to allow pushing into
+ remote: error: its current branch; however, this is not recommended unless you
+ remote: error: arranged to update its work tree to match what you pushed in some
+ remote: error: other way.
+ remote: error:
+ remote: error: To squelch this message and still keep the default behaviour, set
+ remote: error: 'receive.denyCurrentBranch' configuration variable to 'refuse'.
+ To jeff:/mnt/media/Movies
+ ! [rejected] git-annex -> git-annex (non-fast-forward)
+ ! [remote rejected] master -> master (branch is currently checked out)
+ error: failed to push some refs to 'jeff:/mnt/media/Movies'
+ To prevent you from losing history, non-fast-forward updates were rejected
+ Merge the remote changes (e.g. 'git pull') before pushing again. See the
+ 'Note about fast-forwards' section of 'git push --help' for details.
+
+It seems that to successfully make the new files known to the other side, I have to log into jeff and pull _from_ my current machine.
+
+What I would like to have is that
+
+* git annex add does not require a commit afterwards.
+* Changes to the files are automatically picked up with the next git-annex call (similar to how etckeeper works).
+* Commands "git annex push" and "git annex pull" that will sync the metadata (i.e. the list of files) in both directions without further manual intervention, at least not until the two repositories have diverged in a way that is not possible to merge sensible.
+
+Summay: git-annex is great. git is not always. Please make it possible to use git annex without having to use git.
diff --git a/doc/forum/pure_git-annex_only_workflow/comment_1_a32f7efd18d174845099a4ed59e6feae._comment b/doc/forum/pure_git-annex_only_workflow/comment_1_a32f7efd18d174845099a4ed59e6feae._comment
new file mode 100644
index 000000000..def1794a3
--- /dev/null
+++ b/doc/forum/pure_git-annex_only_workflow/comment_1_a32f7efd18d174845099a4ed59e6feae._comment
@@ -0,0 +1,32 @@
+[[!comment format=mdwn
+ username="http://joey.kitenet.net/"
+ nickname="joey"
+ subject="comment 1"
+ date="2011-12-09T22:56:11Z"
+ content="""
+First, you need a bare git repository that you can push to, and pull from. This simplifies most git workflow.
+
+Secondly, I use [mr](http://kitenet.net/~joey/code/mr/), with this in `.mrconfig`:
+
+<pre>
+[DEFAULT]
+lib =
+ annexupdate() {
+ git commit -a -m update || true
+ git pull \"$@\"
+ git annex merge
+ git push || true
+ }
+
+[lib/sound]
+update = annexupdate
+[lib/big]
+update = annexupdate
+</pre>
+
+Which makes \"mr update\" in repositories where I rarely care about git details take care of syncing my changes.
+
+I also make \"mr update\" do a \"git annex get\" of some files in some repositories that I want to always populate. git-annex and mr go well together. :)
+
+Perhaps my annexupdate above should be available as \"git annex sync\"?
+"""]]
diff --git a/doc/forum/pure_git-annex_only_workflow/comment_2_66dc9b65523a9912411db03c039ba848._comment b/doc/forum/pure_git-annex_only_workflow/comment_2_66dc9b65523a9912411db03c039ba848._comment
new file mode 100644
index 000000000..473a0287d
--- /dev/null
+++ b/doc/forum/pure_git-annex_only_workflow/comment_2_66dc9b65523a9912411db03c039ba848._comment
@@ -0,0 +1,15 @@
+[[!comment format=mdwn
+ username="http://www.joachim-breitner.de/"
+ nickname="nomeata"
+ subject="comment 2"
+ date="2011-12-10T16:28:29Z"
+ content="""
+Thanks for the tips so far. I guess a bare-only repo helps, but as well is something that I don’t _need_ (for my use case), any only have to do because git works like this.
+
+Also, if I have a mobile device that I want to push to, then I’d have to have two repositories on the device, as I might not be able to reach my main bare repository when traveling, but I cannot push to the „real“ repo on the mobile device from my computer. I guess I am spoiled by darcs, which will happily push to a checked out
+remote repository, updating the checkout if possible without conflict.
+
+If I introduce a central bare repository to push to and from; I’d still have to have the other non-bare repos as remotes, so that git-annex will know about them and their files, right?
+
+I’d appreciate a \"git annex sync\" that does what you described (commit all, pull, merge, push). Especially if it comes in a \"git annex sync --all\" variant that syncs all reachable repositories.
+"""]]