[git-users] Re: Noob question: In a large company setting, is it normal to spend 3+ hours a day sorting out git issues?

2017-01-16 Thread AD S
Hi all,

I decided to screen shot one of these issues I'm encountering. This is a 
kind of small one.

I've been styling a site - just .scss files. I pushed to Github at the end 
of the day and saw I had 400+ files that I had apparently altered and 
merged to the branch. This isn't true - I'd only worked on a handful of 
files. I spent a few hours trying to figure out why this was before giving 
up and continuing with my styling (remembering to also manually save a 
local copy of the files I was working). When I returned today to look at 
the branch and try to address the problem again, I see that it is back to 
normal.

I don't know why the branch suddenly contained a few hundred more files 
than I was working on our why it now suddenly doesn't. This was a lucky one 
- it fixed its self.



-- 
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] Re: Noob question: In a large company setting, is it normal to spend 3+ hours a day sorting out git issues?

2017-01-16 Thread AD S
Am I using the Github Web interface?

Apart from checking that my files are up there, no I don't. Some people 
here do use it to peer-review code and leave comments against parts of the 
files, though.




>
> Now, I see that you are using both local repositories and github 
> repositories. Are you also using the github web interface? 
>
> --- 
> Entertaining minecraft videos 
> http://YouTube.com/keybounce 
>
>

-- 
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] "Medium" git: Worktrees, submodules, subtrees

2017-01-16 Thread Michael

On 2017-01-16, at 10:25 AM, Philip Oakley  wrote:

> Hi Michael,
> 
> You are right about the historical perspective.
> 
> However the `Worktrees` is a new feature.
> 
> So yes, you can now have the different branches checked out in differemt 
> trees, and other goodies.

Ok, on worktrees:

Normally, if you have a branch checked out in a single work-tree, you know 
where you are, and you know what happens when you commit, or merge. Any time 
that there could be a conflict is only on merge, or on push. Push requires 
(effectively) that the histories agree, and merge detects conflicts and 
combines or asks you to combine.

But that works if a single repository is only working with one set of files 
being modified.

Lets say that two different worktrees have the same branchhead checked out. 
They make conflicting edits. The first commit works just fine. What happens on 
the second commit?

Commit never had to worry about conflicts before; unless I'm missing something, 
now it does.

===

I found this example really "fascinating". From the manual:
 You are in the middle of a refactoring session and your boss comes in and 
demands that you fix something immediately. You might typically use 
git-stash(1) to store your changes away temporarily, however, your working tree 
is in such a state of disarray (with new, moved, and removed files, and other 
bits and pieces strewn around) that you don't want to risk disturbing any of 
it. 

Considering that this is exactly what git stash uses as it's example, plus that 
I've had exactly this problem -- a complete mess of a worktree that did not 
stash and then apply properly -- I found this highly informative.

But as for why it did not apply correctly? Conflicting updates, I think, if I 
remember correctly.

So yea, I'm concerned about how the commit works if a worktree made a change 
underneath you.

> 
> Philip
> 
> - Original Message - From: "Michael" 
> To: 
> Sent: Monday, January 16, 2017 5:45 PM
> Subject: [git-users] "Medium" git: Worktrees, submodules, subtrees
> 
> 
> (I hope this isn't considered "advanced" git.)
> 
> So I just recently found out about worktrees, that let you have two different 
> working trees from the same repository. (NB: Originally, I thought I had 
> learned that git only supported one work tree per repository, but had a 
> special "hardlink" to let two repositories share disk space on the same drive 
> -- did I misunderstand something?).
> 
> Now, there's submodules, and subtrees. I'd like a bit of an explanation here.
> 
> A submodule is at least at first simple enough: you have a subproject with 
> it's own history. But that's about all I understand about it.
> 
> I can't tell if there's any way to convert a sub directory of a project into 
> a submodule, or visa-versa, or if it is a "lifetime" choice.
> 
> And the man page on submodules talks about a "subtree merge strategy", and 
> I'm not sure I've even heard that before.
> 
> So: Help? Please? Confused?
> 
> ---
> Entertaining minecraft videos
> http://YouTube.com/keybounce
> 
> -- 
> 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.
> 
> -- 
> 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.

---
Entertaining minecraft videos
http://YouTube.com/keybounce

-- 
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] "Medium" git: Worktrees, submodules, subtrees

2017-01-16 Thread Philip Oakley

Hi Michael,

You are right about the historical perspective.

However the `Worktrees` is a new feature.

So yes, you can now have the different branches checked out in differemt 
trees, and other goodies.


Philip

- Original Message - 
From: "Michael" 

To: 
Sent: Monday, January 16, 2017 5:45 PM
Subject: [git-users] "Medium" git: Worktrees, submodules, subtrees


(I hope this isn't considered "advanced" git.)

So I just recently found out about worktrees, that let you have two 
different working trees from the same repository. (NB: Originally, I thought 
I had learned that git only supported one work tree per repository, but had 
a special "hardlink" to let two repositories share disk space on the same 
drive -- did I misunderstand something?).


Now, there's submodules, and subtrees. I'd like a bit of an explanation 
here.


A submodule is at least at first simple enough: you have a subproject with 
it's own history. But that's about all I understand about it.


I can't tell if there's any way to convert a sub directory of a project into 
a submodule, or visa-versa, or if it is a "lifetime" choice.


And the man page on submodules talks about a "subtree merge strategy", and 
I'm not sure I've even heard that before.


So: Help? Please? Confused?

---
Entertaining minecraft videos
http://YouTube.com/keybounce

--
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.

--
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] "Medium" git: Worktrees, submodules, subtrees

2017-01-16 Thread Michael
(I hope this isn't considered "advanced" git.)

So I just recently found out about worktrees, that let you have two different 
working trees from the same repository. (NB: Originally, I thought I had 
learned that git only supported one work tree per repository, but had a special 
"hardlink" to let two repositories share disk space on the same drive -- did I 
misunderstand something?).

Now, there's submodules, and subtrees. I'd like a bit of an explanation here.

A submodule is at least at first simple enough: you have a subproject with it's 
own history. But that's about all I understand about it. 

I can't tell if there's any way to convert a sub directory of a project into a 
submodule, or visa-versa, or if it is a "lifetime" choice.

And the man page on submodules talks about a "subtree merge strategy", and I'm 
not sure I've even heard that before.

So: Help? Please? Confused?

---
Entertaining minecraft videos
http://YouTube.com/keybounce

-- 
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] "Medium" git: Worktrees, submodules, subtrees

2017-01-16 Thread Michael
(I hope this isn't considered "advanced" git.)

So I just recently found out about worktrees, that let you have two different 
working trees from the same repository. (NB: Originally, I thought I had 
learned that git only supported one work tree per repository, but had a special 
"hardlink" to let two repositories share disk space on the same drive -- did I 
misunderstand something?).

Now, there's submodules, and subtrees. I'd like a bit of an explanation here.

A submodule is at least at first simple enough: you have a subproject with it's 
own history. But that's about all I understand about it. 

I can't tell if there's any way to convert a sub directory of a project into a 
submodule, or visa-versa, or if it is a "lifetime" choice.

And the man page on submodules talks about a "subtree merge strategy", and I'm 
not sure I've even heard that before.

So: Help? Please? Confused?

---
Entertaining minecraft videos
http://YouTube.com/keybounce

-- 
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 bundle - Branches are missing after clone

2017-01-16 Thread Ralf Tobel
Actually I planned to use the bundle as a nice way of creating a backup in 
a single file.
And since I see the branches in the bundle when I use the 'git bundle 
list_heads' command I thought there might be a way to access them.

-- 
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 bundle - Branches are missing after clone

2017-01-16 Thread Konstantin Khomoutov
On Mon, 16 Jan 2017 05:27:41 -0800 (PST)
Ralf Tobel  wrote:

> I have a strange problem when working with bundles.
> 
> I first create a bundle from a repository with tags and branches
> using the following command:
> git -C   bundle create Test.bundle --all
> 
> When I use the follwing command I can see that all the tags and
> branches are showing up in the bundle:
> git bundle list-heads Test.bundle
> 
> Now I clone the bundle using this command:
> git clone Test.bundle TestRepo
> 
> When using 'git tag' all the tags are listed as in the list_heads
> above. But when using 'git branch [-r]' none of the branches are
> listed, altough the appear in list_heads.
> 
> It also possible to checkout a tag (of course since they are listed),
> but it's not possible to checkout a branch listed in list-heads.
> 
> Does anybody know what might be the cause of this?

Uh, why do you think cloning a Git bundle is different from cloning
a regular Git repository?  When cloning with default (assumed)
settings, you indeed end up with only a single local branch created.

Let's cite the `git clone` manual:

| DESCRIPTION
|   Clones a repository into a newly created directory, creates
| remote-tracking branches for each branch in the cloned repository
| (visible using git branch -r), and creates and checks out an initial
| branch that is forked from the cloned repository’s currently active
| branch.

I've just git-bundle-d one of my repositories and then cloned it
normally, and `git clone` behaved as documented above.

If you wanted to get a "mirror" of the original repository, it can be
done in several steps by separating initialization of the target
repository and fetching references (heads and tags) into it:

  git init target
  cd target
  git fetch -u path/to/git/bundle 'refs/*:refs/*'
  git reset --hard

The "-u" command-line option to `git fetch` tells it that it's okay to
update the branch named "master" which is currently checked out (even
though it's "unborn" yet), and the so-called "refspec" at the end of
this command tells it to update all the local refs with all the
(matching) remote refs.

The following `git reset --hard` resets the checked out "master" branch
and the index to the tip commit which was fetched for that branch.

-- 
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] The remote end hung up unexpectedly - sideband< \3error: Internal server error

2017-01-16 Thread Matteo Palmieri
Hi,

this is my first post here, so I may be inaccurate. Thanks in advance for 
your patience.
I have a problem pushing commits to Gerrit using git on a Linux node. I 
think it is relevant to explain the configuration I have before going into 
the problem description:

1. I have a Windows 7 workstation with git bash client installed (1.9.5).
2. I have a Linux node running into VMWare on Windows 7 mentioned in 1.
3. The Linux node mentioned 2. runs git client for Linux (version 2.7.4)

I have problem pushing commits Gerrit on Linux node (using git repository 
Project/Intel)
I have no problem pushing commits to Gerrit on Windows 7 node (using git 
repository Project/Intel)
I have no problem pushing commits to Gerrit on Linux node (using different 
git repository Project/Core)

Also:

Gerrit instance runs on a separate node in my company network.
Both projects (Project/Intel and Project/Core) are hosted on the same 
server and have similar configuration.

Here is the explanation of the problem and how I reproduce on the Linux 
node. I can't reproduce on the Windows node

osboxes@osboxes ~/Product/Intel $ uname -a
Linux osboxes 4.4.0-21-generic #37-Ubuntu SMP Mon Apr 18 18:34:49 UTC 2016 
i686 i686 i686 GNU/Linux


osboxes@osboxes ~/Product/Intel $ git --version
13:17:06.408392 git.c:344   trace: built-in: git 'version'
git version 2.7.4


osboxes@osboxes ~/Product/Intel $ git config --list
user.email=john.sm...@mycompany.com
user.name=John Smith
core.editor=vi
http.postbuffer=1048576000
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
remote.origin.url=https://mygitserver.com/gerrit-platforms/Product/Intel
remote.origin.fetch=+refs/heads/DEVELOPMENT_BRANCH:refs/remotes/origin/DEVELOPMENT_BRANCH
branch.DEVELOPMENT_BRANCH.remote=origin
branch.DEVELOPMENT_BRANCH.merge=refs/heads/DEVELOPMENT_BRANCH


osboxes@osboxes ~/Product/Intel $ git push origin 
HEAD:refs/for/DEVELOPMENT_BRANCH

[...]

Counting objects: 3, done.
Compressing objects: 100% (3/3), done.
10:38:59.722316 pkt-line.c:80   packet:  git< PACK ...
Writing objects: 100% (3/3), 407 bytes | 0 bytes/s, done.
Total 3 (delta 2), reused 0 (delta 0)
10:38:59.724724 pkt-line.c:80   packet:  git> 
* Couldn't find host ams.mycompany.com in the .netrc file; using defaults
* Found bundle for host ams.mycompany.com: 0x8cf9500 [can pipeline]
* Re-using existing connection! (#1) with host ams.mycompany.com
* Connected to ams.mycompany.com (10.10.10.10) port 443 (#1)
* Server auth using Basic with user 'john.smith'
> POST /gerrit-platforms/Product/Intel/git-receive-pack HTTP/1.1
Host: ams.mycompany.com
Authorization: Basic XX
User-Agent: git/2.7.4
Accept-Encoding: gzip
Content-Type: application/x-git-receive-pack-request
Accept: application/x-git-receive-pack-result
Content-Length: 604

* upload completely sent off: 604 out of 604 bytes
< HTTP/1.1 200 OK
< Date: Mon, 16 Jan 2017 10:38:59 GMT
< Server: Apache
< Content-Type: application/x-git-receive-pack-result
< Content-Length: 33
<
10:38:59.924253 pkt-line.c:80   packet: sideband< \3error: 
Internal server error
remote: error: Internal server error
fatal: The remote end hung up unexpectedly
* Connection #1 to host ams.mycompany.com left intact
fatal: The remote end hung up unexpectedly
error: failed to push some refs to 
'https://mygitserver.com/gerrit-platforms/Product/Intel/Intel'
osboxes@osboxes ~/Product/Intel $

This issue is 100% reproducible on my Linux box, but I haven't tried on 
other boxes, at the moment.
How do I troubleshoot this?

-- 
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] git bundle - Branches are missing after clone

2017-01-16 Thread Ralf Tobel
Hello,

I have a strange problem when working with bundles.

I first create a bundle from a repository with tags and branches using the 
following command:
git -C   bundle create Test.bundle --all

When I use the follwing command I can see that all the tags and branches 
are showing up in the bundle:
git bundle list-heads Test.bundle

Now I clone the bundle using this command:
git clone Test.bundle TestRepo

When using 'git tag' all the tags are listed as in the list_heads above. 
But when using 'git branch [-r]' none of the branches are listed, altough 
the appear in list_heads.

It also possible to checkout a tag (of course since they are listed), but 
it's not possible to checkout a branch listed in list-heads.

Does anybody know what might be the cause of this?

Regards,
Ralf

-- 
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.