[git-users] Git server silently drops updates on push

2014-09-19 Thread Bruce Perens
Hi,

No doubt this is stupid RTFM stuff but I'm not finding it.

I have a git server at http://git.algoram.com/dvs/
This is updated via SSH push.

I created it with "git --bare init".
I populated it with "git push" from my development system.

All good so far.

Now, I create an update and push it.

If I use git from the shell on the server, I see the update and its log 
entry.
If I run "git clone http://git.algoram.com/dvs/"; to clone from the same 
server to a temporary directory, I get everything from before the update. 
My update and its log entry are not present.

Obviously there is something non-intuitive going on. Like I am getting 
different branches. Can someone give me a clue?

Thanks

Bruce Perens

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[git-users] Sort specific hash ids in reverse chronological order..

2014-09-19 Thread Kumar
Hi All, 

New to git, I've a branch from which I need to revert some 40 hashs.  These 
40 sha ids are not in the right order to revert.

Example A - B - C -  - Z.

I've got C, F, Z , Y to revert.  I need to have the recent id first, like 
Z, Y, F, C so that the revert is correct and smooth.  

I've checked rev-list but that dint work, it picks up all the ids between 2 
hash ids when tried with 2 ids.  Not sure how this works.

Any help how can I re-order ? git command or a new shell script ?  

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] .git/index & .git/HEAD corrupted after power surger

2014-09-19 Thread Konstantin Khomoutov
On Tue, 16 Sep 2014 05:57:30 -0700 (PDT)
"muhammad.iqbal dwi.cahyo"  wrote:

> Hello everyone, I'm relatively new to git :) git awesome, lightweight
> and compatible with windows environment :) I start developing my
> project under git dvcs, unfotunately I had this problem a while ago
> T___T
> 
> 
> I already made a project there, add, commit, push. Unfotunately, I've
> got power surgery :'(

That's "surge"; "surgery" is when someone undergoes an invasive
operation done by medical personnel :-)

> When I've tried restart my PC, I cd back to my project folder, but
> suddenly it looks like these:
> 
> UserName@PC /c/xampp/htdocs/website
> 
> before 
> UserName@PC /c/xampp/htdocs/website (master)

That means Git Bash failed to parse the HEAD reference.
That's because it's seriously hosed (see below).

> I tried "git init" and this showed up:
> 
> Reinitialized existing Git repository in c:/xampp/htdocs/website/.git/
> 
> but, nothing happen to my repo T__T

> it still looks like these: 
> UserName@PC /c/xampp/htdocs/website
> 
> Thank you very much, your guidance please t(^_^)
> 
> *EDIT*: I did git stash save before power surgery & this files comes
> up: 

The repo is seriously botched.  The HEAD ref contains 40 bytes
with the value 0 while it normally contains some ASCII text (something
like "ref: refs/heads/master" without the quotes in your case).
The index has a binary format so that's sort of OK it's not
human-readable but its first several hundred bytes definitely are not 0
normally as well.

What do do now.

The first thing is to back the whole project directory
(/c/xampp/htdocs/website) which means to *copy* it in its entirety
to some other filesystem, known to be in a good state.
The next step is to run

  chkdsk /x /f c:

in your console window (cmd.exe) (supposedly you have to run it as
an administrator), answer yes when it asks you whether it's OK to
schedule disk check at the next reboot, then reboot and make the disk
checker do its work.  If it'll tell you it have found errors, repeat
the check after the box boots.

Once you have your file system in a consistent state, return to your
hosed repository and try this:

1. Make sensible HEAD ref:

echo "ref: refs/heads/master" >.git/HEAD

2. Delete the botched index file:

rm .git/index

3. Re-create the index:

git read-tree HEAD

4. Run Git's object store checker:

git fsck --lost-found

The last step should attempt to repair whatever inconsistencies it
finds or at least report them.  It will also create entries for
entities it considers being lost under the .git/lost-found
directory.

If this tools runs and does not throw up in despair, try to inspect
the state of the repository (`git log`, `gitk` etc).

If you'll not be satisfied with the result, come back with more
information so we could think further.

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.