Re: [git-users] Updating a staged file makes it dissappear

2017-03-21 Thread AD S


On Tuesday, March 21, 2017 at 4:53:51 PM UTC+10, Gergely Polonkai wrote:
>
> Could you show us how you ran checkout? It’s strange to me it staged your 
> file.
>
> If you have a file in the index and adding modifications makes the file 
> disappear, that means the changes added later negates the changes in the 
> index.
>
> Try it: add a line to an unmodified file, add to the index. Now remove the 
> file and add again. The index is now empty. This is Git’s way to prevent 
> you making empty commits.
>
> If I were you, I would do the checkout again, and check the contents of 
> the index with git diff --cached. That may give you a hint on what’s going 
> on.
>
> Gergely
>
> On Tue, Mar 21, 2017, 05:07 AD S <ad...@radianweb.com.au > 
> wrote:
>
>> I made a mistake in the code on a file on a remote repo and so used 
>> `checkout` to bring it into my branch to fix it. Running `git status` 
>> immediately after, I see the file is modified and staged.
>>
>> I then make my changes to fix the code and run `git status` again and see 
>> 2 'versions' of the same file - one staged and one not. Makes sense, all I 
>> got to do is `git add` the unstaged one and it will update the one in stage.
>>
>> I do this and `git status` again but now stage is now empty. I get the 
>> message `nothing to commit (working directory clean)`.
>>
>> To experiment, I run through the commit, push, merge process and check 
>> the remote repo, but, of course, the buggy code is still there.
>>
>> Would anyone know what's going on here?
>>
>> -- 
>> 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+...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

It's ok, I think I know why this happened, though there are still some 
questions.

The issue was that I had already fixed the code on my branch sometime 
earlier, so when I checked-out the file and fixed it again Git could not 
see any difference between the code held on my branch and the file I had 
just fixed, so it saw there was no changes and thus nothing to commit.

That's fine. However, the question now is: if my branch was already 
up-to-date with the fixed code, why was I not able to merge it with the 
remote repo that still had the buggy code? When I tried to merge it seemed 
to work seamlessly - no error messages or conflicts.

 

-- 
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] Updating a staged file makes it dissappear

2017-03-20 Thread AD S
I made a mistake in the code on a file on a remote repo and so used 
`checkout` to bring it into my branch to fix it. Running `git status` 
immediately after, I see the file is modified and staged.

I then make my changes to fix the code and run `git status` again and see 2 
'versions' of the same file - one staged and one not. Makes sense, all I 
got to do is `git add` the unstaged one and it will update the one in stage.

I do this and `git status` again but now stage is now empty. I get the 
message `nothing to commit (working directory clean)`.

To experiment, I run through the commit, push, merge process and check the 
remote repo, but, of course, the buggy code is still there.

Would anyone know what's going on here?

-- 
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] Re: Merging my branch into a remote repo, I encounter a merge conflict with a file I have not touched in my branch. What is the best course of action?

2017-03-01 Thread AD S
I think I found the problem: it was a change in permissions, not the actual 
code

On Wednesday, March 1, 2017 at 11:14:21 AM UTC+10, AD S wrote:
>
> I am in the process of merging my branch into a remote repo (that others 
> contribute to as well).
>
> I get a merge error on a file I have not touched in my branch.
>
> Curious I open the file, expecting to see the merge conflicts highlighted, 
> eg: *<<<
> I do not have access to the remote repo on Github so I cannot inspect 
> 'their' file to see the differences.
>
> I attempted to `git checkout --theirs file/name` but got an error: unable 
> to unlink old 'file/name' (Permission denied)
>
> I attempted to move out of the branch to try and start again but got an 
> error saying I had merge conflicts to resolve.
>
> I don't want to `git add` my version of the file, because I can't tell if 
> it's correct or not.
>
> What is the best course of action here?
>
>

-- 
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] Merging my branch into a remote repo, I encounter a merge conflict with a file I have not touched in my branch. What is the best course of action?

2017-02-28 Thread AD S
I am in the process of merging my branch into a remote repo (that others 
contribute to as well).

I get a merge error on a file I have not touched in my branch.

Curious I open the file, expecting to see the merge conflicts highlighted, 
eg: *<<

Re: [git-users] What's the best course of action when you need a file from another branch that is not yet merged with master?

2017-02-28 Thread AD S
Cheers! Yep, that's the desire. 

On Wednesday, March 1, 2017 at 10:29:29 AM UTC+10, Philip Oakley wrote:
>
> don't forget the space between -- and path/to/file.ext
>  
> the command would overwrite your current version with the version from 
> --their, is that the desire?
>
>

-- 
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] What's the best course of action when you need a file from another branch that is not yet merged with master?

2017-02-27 Thread AD S


I am new to git. I'm working on a large project that has many contributors.


I've created a .scss file in a branch that has not yet been reviewed and 
merged in with master.


I need that same file in a new branch to add some code to it. I've been 
told it is not a good idea to create the same file again as Git will see 
them as 2 different files with the same name and won't necessarily merge 
them together.


What would be the correct way of dealing with this whilst waiting for it to 
be cleared in master?

-- 
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] When I update a branch from master I don't get the same files as when I create a new branch. Would anyone know why?

2017-02-22 Thread AD S
When I update my branch from master it pulls down several files, including 
some sass files. When I compile, however, gulp alerts me that I am missing 
.scss files.

I tested this by creating a new fresh branch and running gulp sass. This 
time there were no errors and I saw the missing .scss had been brought in.

Would anyone know why, on update, I am only getting some of the files from 
master?

-- 
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] When updating from master, I get a message on a file that was 'added by us' although this file is its self on master.

2017-02-22 Thread AD S
When updating from master I get a message 

added by us: sass/styles.scss


However, this file already exists on master. 

Shouldn't this just be a merge conflict? 

-- 
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] Re: Noob question: How can I inspect a file 'added by them'?

2017-02-22 Thread AD S
Many thanks all.

This is very useful info.

-- 
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] When checking out master into a branch, how do I deal with files that say they're modified but weren't?

2017-02-21 Thread AD S
I've updated my branch from master and have gotten a series of merge 
errors. 

Normally I would just adjust the code and re-commit, but I am unsure about 
how to go about the ones in the following situation:

#   both modified:   /js/foundation6.init.js  <--this is updated in 
master. I want to override mine with theirs.
#   deleted by us:  /sass/new.scss <--this is the real .scss file. 
I want to keep this. I did'nt delete it because I've never had it on my 
branch.
#   both modified:  _content.scss <--this is what I actually 
modified. I can fix the code in this fine
#   both modified:  src/gulp/configs/framework-index.js <--this is 
updated in master. I want to override mine with theirs.

With foundation6.init.js and framework-index.js I've never touched these 
and don't want to mess around with the code inside. I am happy for Master 
to overide whatever is on my branch.

With content.scss Its the only file I actually modified and I can resolve 
the merge conflict myself.

With main.scss I don't know why it was deleted. I've never had it on my 
branch, but want to include it.

Can someone tell me what I would need to do to get the desired outcome?

-- 
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] Re: [Noob] How to update my local branches/repo with remote repo's content?

2017-02-14 Thread AD S
Found a solution!

git merge origin/develop


-- 
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-02-13 Thread AD S


On Tuesday, February 7, 2017 at 8:02:08 AM UTC+10, Hugh Gleaves wrote:
>
> My position here is that I do not think Git does a good job of promoting 
> itself.
>
> It uses terminology that confuses newcomers because things with names like 
> "checkout" don't quite mean what they mean in other systems.
>
> Far too much educational material, books and documentation is command line 
> oriented and this is off-putting for many.
>

I totally agree with this.

I've tried to 'crack' it many times. I can understand the basics absolutely 
fine, but as soon as something out of the ordinary happens I'm completely 
lost. I don't know the correct terminology to Google the solution. If I do 
find something that sounds similar to my situation, then the solution is 
way beyond my level and though I try I stuff it up and make an even bigger 
mess. I've been through so many rabbit holes of endless Googling.

I've been stuck at this level for months now - there seems to be a huge 
leap between knowing the basics to the next level of understanding. It 
feels like the difference in learning a few phrases of another language one 
day then all of a sudden being forced to have in-depth conversations the 
next.

-- 
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] [Noob] How to update my local branches/repo with remote repo's content?

2017-02-13 Thread AD S
I'm really sorry, I just don't get it - I'm trying my best.

I'm going to try explain this without using Git terminology as I think I'm 
getting that wrong and confusing everyone.
---

At my job I write code and move it (push?) to a remote repo called 
'develop' where other people can view it and QA it. Other devs do this too.

Another dev has made some changes that I wish to have on my local repo 
(checkout?) as some future work requires his files. In fact, I thought, I 
may as well update my local version of the site by grabbing all the updates 
that have been transferred (pushed?) to the develop repo

I though `git checkout develop` would do the trick, so tried that. This 
seemed to bring in (pull?) all the latest files down, which was great! But 
it also changed my branch from the one I was working on to `develop`. I 
relised I was just grabbing (checking out?) the develop branch, not 
merging(?) it with my own.

I then thought to use `git merge` and tried `git merge develop/mybranch` 
but I got the error "mybranch does not point to a commit". I googled this 
error but only found stuff that was beyond my understanding.

I then tried `git fetch develop` but this threw an error that said 
"'develop' does not appear to be a git repository".

Same as above with `git pull develop`.

I then looked into `git clone` but this didnt seem to merge, just copy the 
entire repository as a separate, independent repo. This seemed like it 
would give me alot more headaches and so I avoided it.

So, yeah, I hate to ask again (I feel like a dumbass) but how do I do 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.


Re: [git-users] What's the correct way of selecting 'ours' or 'theirs' when encountering a merge conflict on push?

2017-01-31 Thread AD S
Thanks for your detailed reply. That's very appreciated. Honestly, I'm 
trying really hard to get my head around Git, but, for whatever reason, 
it's just taking a long time to click with me.

So, I guess what I was trying to do was your first example, the 'Forced 
Commit'. Both myself and the remote repository have a copy of an identical 
file. I make alterations to that file and want to replace the version on 
the remote repo with mine.




On Friday, January 27, 2017 at 4:48:27 PM UTC+10, Konstantin Khomoutov 
wrote:
>
> On Thu, 26 Jan 2017 16:29:12 -0800 (PST) 
> AD S <ad...@radianweb.com.au > wrote: 
>
> > I push a file to a remote repo and get a merge conflict error. I know 
> > my file is totally correct - there's no need to look through the 
> > code, I just want to overwrite the remote file with mine. 
> > 
> > I've tried: 
> > 
> > 
> >- git merge --strategy-option ours PATH/FILE 
> >- git checkout --ours PATH/FILE 
> >- git pull --ours PATH/FILE 
> > 
> > but none of these seem to work. It either throws an error or doesnt 
> > overwrite the remote file. 
> > 
> > What's the correct way of doing this? 
>
> First, some terminological alerts which might indicate you did not yet 
> fully absorbed how distibuted VC systems work: 
>
> * It's impossible to push _a file_ to a remote repo: a minimal chunk of 
>   information you can share using a DVCS -- that is, push or fetch -- 
>   is a single commit. 
>
> * A commit in a DVCS always represents the whole state of the whole 
>   project maintained in the repository. 
>
> * It's impossible to get a merge conflict when pushing in a DVCS: such 
>   systems never attempt to merge anything with anything else when you 
>   push; they merely try to *plant* what you sent to update a branch onto 
>   the tip commit of that branch. 
>
>   Now please think of this a little harder. 
>
>   As you supposedly know (you should know this), each commit existing 
>   in a repository has one or more parents.  Commits explicitly refer 
>   to their parent commits by their SHA-1 names (hashes). 
>   Such lineages are usually rendered using arrows where parent commits 
>   "point to" their child commits; so these arrows are oriented along the 
>   natural progression of the history evolvement: 
>   So if we draw 
>...->P->C->... 
>   this means C is a commit which has commit P as its parent. 
>
>   Now suppose you're trying to push to a branch named "master", 
>   and it currently contains this line of commits: 
>
>   ...->D->E->F->G->H 
>
>   and you're trying to push to that branch a line of history which 
>   ends in the sequence of commits 
>
>   ...->D->E->X->Y->Z 
>
>   The remote Git instance would take this history, compare it with 
>   what's already there and notice that what you sent and what it has 
>   have E as the last common point, and then they diverge. 
>   Git can't merely "graft" your commits X->Y->Z onto H because the 
>   line of history which would result does not exist anywhere in any 
>   repository, and Git has no way to know whether such line of history 
>   would even make sense for the project (for instance, your commit X 
>   could have just deleted all the files in the project). 
>
>   Hence such cases require manual resolution by a human. 
>   There are three possibilities: 
>
>   1) You can do a so-called "forced push" (if allowed by the remote 
>  repository) which would just _throw away_ these commits F->G->H 
>  and replace them with your X->Y->Z. 
>
>  In general, this is a last-resort operation, which is only done 
>  when you're absolutely positively sure what will the result be. 
>
>   2) You can fetch the current state of the branch as seen on the remote 
>  and _merge_ it into your own state. 
>  In the indicated state, that would be: 
>
>  /->F->G->H-\   # "origin/master" 
>  |  | 
>  ...->D->E->X->Y->Z->M  # the resulting merge commit 
>   ^ "master" before the merge 
>
>  You can then push your 
>
>   ...->F->G->H-\ 
>| 
>   ...->X->Y->Z->M 
>
>  to the remote "master", and since the "diamond" you'll be pushing 
>  includes the F->G->H sequence currently at the tip of that branch, 
>  Git will happily accept your history. 
>
>   3) You can fetch the current state of the branch as seen on the remote 
>  and _rebase_ your commits on top of that new sta

[git-users] What's the correct way of selecting 'ours' or 'theirs' when encountering a merge conflict on push?

2017-01-26 Thread AD S
I push a file to a remote repo and get a merge conflict error. I know my 
file is totally correct - there's no need to look through the code, I just 
want to overwrite the remote file with mine.

I've tried:


   - git merge --strategy-option ours PATH/FILE
   - git checkout --ours PATH/FILE
   - git pull --ours PATH/FILE

but none of these seem to work. It either throws an error or doesnt 
overwrite the remote file.

What's the correct way of doing this?

Thanks

-- 
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] Newb question: can some one explain to me why, when pushing Sass files, only the compiled .css file gets flagged as a merge error and not the .scss files?

2017-01-26 Thread AD S
Yeah, checkout SASS and/or LESS. You can now make variables with css and 
make layered and nested classes. A compiler will then 'hard code' the 
variables, lint the code and remove comments, spaces and line breaks to 
minify the file.


On Thursday, January 26, 2017 at 2:56:05 AM UTC+10, Michael Gersten wrote:
>
> So those crazy cascading style sheets that are a  to edit with Stylish 
> are actually compiled from something else that is human read/edit-able?
>
> That makes a lot of sense, actually. I thought they were just spat out by 
> some program that did layout.
>
>
>

-- 
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] Newb question: can some one explain to me why, when pushing Sass files, only the compiled .css file gets flagged as a merge error and not the .scss files?

2017-01-24 Thread AD S
Ah, so presumably in setting up my development box, some one told git not 
to track .scss files.

Cheers

On Wednesday, January 25, 2017 at 11:42:27 AM UTC+10, charlesmanning wrote:
>
> Git has no magic knowledge of scss files or css files. It will track 
> whatever you tell it to track.
>
> So for example let's use something more people are familiar with  - 
> something like C.
>
> If you tell git to track foo.c it will track foo.c.
> If you tell it to  track foo.o it will track foo.o.
>
> If you tell it to track both it will track both.
>
> Same with your scss and css files.
>
> Generally you don't want to track derived files (ie. stuff that is an 
> output from compiling) - though there are exceptions to this.
>
> If you no longer want to track the css file than remove it from git with 
> git rm
>
> You might also want to add it to your .gitignore file too.
>
>
>  
>
> On Wed, Jan 25, 2017 at 2:19 PM, AD S <ad...@radianweb.com.au 
> > wrote:
>
>> So, if I make changes to a .scss file and compile it into a .css file and 
>> then push the entire project to a remote repo, there are 2 files that have 
>> been altered, right?
>>
>> I've noticed, however, that only the .css file appears with merge 
>> conflict notices.
>>
>> Would anyone know why this is? Could it be the way my company set up git? 
>> To automatically accept that my version of the .scss files will always 
>> override the remote repo's version?
>>
>> -- 
>> 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+...@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] Newb question: can some one explain to me why, when pushing Sass files, only the compiled .css file gets flagged as a merge error and not the .scss files?

2017-01-24 Thread AD S
So, if I make changes to a .scss file and compile it into a .css file and 
then push the entire project to a remote repo, there are 2 files that have 
been altered, right?

I've noticed, however, that only the .css file appears with merge conflict 
notices.

Would anyone know why this is? Could it be the way my company set up git? 
To automatically accept that my version of the .scss files will always 
override the remote repo's version?

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

2017-01-11 Thread AD S
 

> It's not normal. Is everyone expending that much time solving git issues? 
> Or it's just you?
>

Probably more so me, but I do know others spend a surprising (to me) amount 
of time on it. I posted the question because I have raised that I have 
issues with it a few times and no one's really seemed surprised that I am 
spending so much time on it.

Perhaps I am thinking of it wrongly - I always thought Git was a kind of 
'helper' tool that ran in the background.
 

> I would say that you are still learning to use git. It take some time to 
> learn to use it reasonably well. Also it's better to understand how it 
> works, not just how to use it, you will see git in other way
>

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

2017-01-11 Thread AD S


On Thursday, January 12, 2017 at 3:35:05 PM UTC+10, Mattias Vannergård 
wrote:
>
> What kind of "strange issues" do you have to sort out?
>

 You can see some of them in my posts here. Issues include:

   - 'Both modified' errors on files I have never touched.
   - 'Polluted' pull requests on github. This is where I push a branch to 
   github and it ends up also including loads of other peoples work. Sometimes 
   I can solve this by closing the PR and re-opening it, sometimes I have to 
   start a new branch. I've had to manually save a back up of work to my local 
   computer, which I feel kinda defeats some of the purpose behind git.
   - Sometimes when I push to the remote repo, only some of the files 
   appear. However, if I push to Github I can see them all appearing fine.

 

>
> Do you have a common process for branching and merging?
>

Yes, we use a simple CLI, inhouse software that is meant to fire several 
git commands at once so you don't miss any or do them out of order.
 

And do you have any education for "how to use Git" in your organisation?
>

No. I've been trying to teach my self with books and tutorials. I believe I 
have a firm understanding of the core concepts, but I keep getting these 
strange errors coming from left field. 
 
 

> How many repos do you have?
>

4, including local
 

>
> Do you use submodules or subtrees or neither or both?
>

Neither. 


Thanks! 

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

2017-01-11 Thread AD S
Hi all,

Sorry I really don't mean for this to sound pessimistic or whiny - it 
really is a genuine question.

I come from a background of solo work where I didn't really use git all 
that much. Now I work with a very large company and git is a huge part of 
the workflow.

However, I spend usually around 3hrs a day just trying to sort out strange 
issues I come up against with git. Everyone else here just seems to think 
this is par for the course, but it frustrates me a lot.

Is this normal when working with large 100+ organisations?

-- 
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: pushing files to remote repo I get merge errors on files I have not changed. Why is this?

2017-01-11 Thread AD S


On Monday, January 9, 2017 at 9:04:59 AM UTC+10, Magnus Therning wrote:
>
>
> AD S <ad...@radianweb.com.au > writes: 
>
> > Hi, sorry for the delay in reply. 
> > 
> > I'm not sure what you mean sorry. Can you extrapolate? 
>
> Operating systems make use of different line endings in text documents, 
> see https://en.wikipedia.org/wiki/Newline. 
>
> Since git deals with text documents but doesn't have any opinion on 
> newline it's not unheard of newline confusion when documents are created 
> and checked in on one system (e.g. Windows) and later pulled over to 
> another system (e.g. Linux). There are numerous resources on this, e.g. 
> https://help.github.com/articles/dealing-with-line-endings/ 
>
> /M 
>
> -- 
> Magnus Therning  OpenPGP: 0x927912051716CE39 
> email: mag...@therning.orgjabber: mag...@therning.org 
>  
> twitter: magthe   http://therning.org/magnus 
>
> Hofstadter's Law: It always takes longer than you expect, even when you 
> take into account Hofstadter's Law. 
>

Sorry I don't understand.

Am I meant to go through all this other code and ensure it had line breaks 
at the end? 

-- 
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] What is exactly happening when a Github pull request gets 'polluted'?

2017-01-05 Thread AD S
Thanks! That makes sense.

On Thursday, January 5, 2017 at 10:58:43 PM UTC+10, Philip Oakley wrote:
>
> AD,
> As Gergely noted, the Github PRS are branch references.
>
> It can be note that one can update a PR by force pushing an updated branch 
> to the website. I use this for revised versions of proposed updates to 
> Git-for-Windows, allowing me to rebase my branch and add in corrections. 
> This hints at the likely issue.
>
> I assume you (or team personnel) have not done any force pushes of the 
> branches they submitted, so the problem is on the flip side of the coin - 
> the destination branch(es) has moved.
>
> That is, the problem is that the branch you wanted to your submission to 
> be included in has moved (in some way, equivalent to a forced push)
>
> You say that there is a standard script that pushes to the test-branch 
> (from everybody). It is likely to be somewhere here that is the issue. 
> Those intermediate branches have been 'moved' in between the setup and 
> checking of the PR status.
>
> Philip.
>
>
> On Thursday, January 5, 2017 at 7:37:30 AM UTC, Gergely Polonkai wrote:
>
>> Hello,
>>
>> it's a bit unclear what exactly you mean by “polluted”. Pull requests in 
>> GitHub are nothing but branches in other the repo of someone else (a fork) 
>> compared with a branch of the main project. If everyone is happy, the 
>> maintainer pushes the Big Green Button (merge this PR), then GitHub 
>> conveniently merges those two branches together.
>>
>> The only way I can think of getting “polluted” is when the main project 
>> accepts PRs often. This way your target branch quickly moves away from the 
>> state the PR was based on, and the author of the PR has to either recreate 
>> the PR or rebase their branch to the new state of the target (GitHub will 
>> recognise such rebase, and automatically updates the PR). If this is your 
>> case, unfortunately I can't see any other solutions. Maybe you should open 
>> a support case with GitHub.
>>
>> Best,
>> Gergely
>>
>> On Thu, Jan 5, 2017, 01:22 AD S <ad...@radianweb.com.au> wrote:
>>
>>> I work in a large team where dozens for branches and commits get created 
>>> daily.
>>>
>>> Sometimes (and seemingly at random), the pull-request I create on Github 
>>> get 'polluted' with other peoples branches and I have to recreate them. 
>>> What might have 20 commits and 10 files ends up with hundred of other 
>>> peoples commits and thousands for files.
>>>
>>> It can be solved by creating a new pull request on that branch, but I 
>>> was curious as to why this occurs.
>>>
>>> Cheers
>>>
>>>
>>> -- 
>>> 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+...@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.


Re: [git-users] What is exactly happening when a Github pull request gets 'polluted'?

2017-01-05 Thread AD S


On Thursday, January 5, 2017 at 5:37:30 PM UTC+10, Gergely Polonkai wrote:
>
> Hello,
>
> it's a bit unclear what exactly you mean by “polluted”. 
>


What I mean is that I will create a branch on Github for my work, which 
will later be merged into the main, large project.

Sometimes, this branch will suddenly include everyone elses work - like 
everyone has been merging to my branch all of a sudden.

Sorry if my terminology is off. Still trying to learn.

-- 
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] Other than gitignore, what could be causing a file to not be pushed to remote repo?

2017-01-04 Thread AD S
Hi Philip,

I am using my company's propriety software that automatically runs a few 
git commands one after the other (it's meant to be more thorougher). The 
process it runs when pushing to remote repo (testing branch) is:


   - git push ${project} ${current_branch_refspec} - Push branch to remote


   - git merge ${current_branch_refspec} - Merging feature into testing 
   branch


   - git push ${project} ${peer_testing_branch} - Pushing testing branch to 
   remote: ${project}


   - git checkout ${branch} - Checking out feature branch: ${branch}



On Thursday, January 5, 2017 at 5:43:45 AM UTC+10, Philip Oakley wrote:
>
> Hi AD
>  
> What commands are you using? 
>  
> In particular what what is your default push style. You may not actually 
> be pushing the branch/commit you expect. There was a change not that long 
> ago that reduced the number of branches being pushed (by default) e.g. 
> 'simple' vs 'matching' / current / upstream etc.
>  
> Also, have to confirmned that you have actually added and comitted those 
> files locally (and have a sha1 for the commit).
>  
> You should then be able to check that the server actually has that commit 
> sha1.
>  
> Philip
>

-- 
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] What is exactly happening when a Github pull request gets 'polluted'?

2017-01-04 Thread AD S
I work in a large team where dozens for branches and commits get created 
daily.

Sometimes (and seemingly at random), the pull-request I create on Github 
get 'polluted' with other peoples branches and I have to recreate them. 
What might have 20 commits and 10 files ends up with hundred of other 
peoples commits and thousands for files.

It can be solved by creating a new pull request on that branch, but I was 
curious as to why this occurs.

Cheers


-- 
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] Other than gitignore, what could be causing a file to not be pushed to remote repo?

2017-01-03 Thread AD S
I was working on updating a couple of .css and a .html file and pushed them 
to my remote repo. The .css files appear to have transitioned fine, but not 
the updates to my .html file.

I looked in gitignore and saw that there was nothing affecting this .html 
file. It should push. If I change something on the file and run `git 
status` it picks it up fine too.

When I push to the remote repo everything runs smoothly. No errors.

Would anyone know why this file could be refusing to be pushed?

-- 
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] Re: Noob question: pushing files to remote repo I get merge errors on files I have not changed. Why is this?

2016-12-19 Thread AD S
I should add that the merge error message I get is 'both modified' even 
though I promise I have not touched these files (let alone even know of 
their existence).

-- 
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 push overwrote remote's files instead of merging. What could have caused this?

2016-12-19 Thread AD S
Ah thanks!

On Monday, December 19, 2016 at 6:19:05 PM UTC+10, Konstantin Khomoutov 
wrote:
>
> On Sun, 18 Dec 2016 23:12:36 -0800 (PST) 
> AD S <ad...@radianweb.com.au > wrote: 
>
> > I pushed some files to my remote server, same as I have always done 
> > for this project. I was expecting to have merge conflicts which I 
> > would fix but I got none. I checked the remote server and saw that my 
> > adjusted files had completely overwritten the files on that server, 
> > meaning that I have now lost heaps of work from other branches. 
> > 
> > Would anyone know what might have caused this? 
> > 
> > My steps were: 
> > 
> >1. git add . 
> >2. git commit 
> >3. git push ${project} ${refspec} 
> >4. git merge ${refspec} 
> >5. git push ${project} ${server} 
>
> You appear to miss one crucial point about Git's interaction with 
> remote repositories: the `git push` operation does not fetch remote 
> changes -- only pushes yours. 
>
> Hence your step (3) merely sent your changes to the remote repository 
> where they were either accepted or rejected. 
>
> Before doing (4) you were supposed to get fetch the remote changes -- 
> to actually have stuff to merge your changes with. 
>
> It seems, that (4) was a no-op then, and from your 
> > my adjusted files had completely overwritten the files on that server 
> it appears that when doing (5), you instructed Git to do the so-called 
> "force push" (by passing that command the "-f" or "--force" 
> command-line option).  Force push literally means "throw away the 
> changes which would conflict with mine, and take those of mine 
> instead" (and hence you should never do this until absolutely 100% sure 
> about what you're doing). 
>
> So I'd say you're lacking a fair bit of knowledge regarding proper 
> workflow to be used with remote repositories.  If yes, yo need to cover 
> this gap.  Supposedly start with [1], and I'd also recommend reading [2] 
> then. 
>
> 1. https://git-scm.com/book/en/v2/Git-Branching-Remote-Branches 
> 2. https://longair.net/blog/2009/04/16/git-fetch-and-merge/ 
>

-- 
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 push overwrote remote's files instead of merging. What could have caused this?

2016-12-18 Thread AD S
I pushed some files to my remote server, same as I have always done for 
this project. I was expecting to have merge conflicts which I would fix but 
I got none. I checked the remote server and saw that my adjusted files had 
completely overwritten the files on that server, meaning that I have now 
lost heaps of work from other branches.

Would anyone know what might have caused this?

My steps were:


   1. git add .
   2. git commit
   3. git push ${project} ${refspec}
   4. git merge ${refspec}
   5. git push ${project} ${server}
   

-- 
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] Noob question: Why do my changes disappear when I switch branches? Anyway to stop this?

2016-11-09 Thread AD S
Hi all, I just wanted to run this past someone as I am having trouble 
understanding how this works with workflow.

I'm working on a large project (currently doing some SASS). I'll get a job 
to, say, style a particular page. When I'm finished I'll push my changes to 
Github where they will be reviewed and eventually combined into the larger 
project, which can take some time.


In the mean time, I need to work on other tasks, so I git checkout a new 
branch. This removes from my directories the .scss files I've been working 
on. I run into a problem if, on the new task, I need to use or adjust some 
of the existing styling I've made which is now no longer present on my 
local. I can manually copy paste the code from Github, but that seems silly.

What can I do to work around 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.


Re: [git-users] Yet more git madness

2016-11-02 Thread AD S
Ah thank you very much! Legend!

On Wednesday, November 2, 2016 at 7:46:19 PM UTC+10, Magnus Therning wrote:
>
>
> AD S <ad...@radianweb.com.au > writes: 
>
> >> 
> >> 
> >> 
> >> I hate to step in here because usually messages like this are just 
> >> exercises in publicly venting frustration, rather than actual requests 
> >> for assistance. 
> >> 
> >> However I don't quite understand what you mean, above.  Every single 
> >> branch in Git represents a history from the HEAD of the branch (where 
> >> the branch tag points) back to the beginning of the repository. 
> >> 
> >> So, when you say "everyone else's commits are on my branch" it's not 
> >> clear what what that refers to, but if you mean that you are seeing all 
> >> the commits back to the start of the repo, not just the commits "on 
> your 
> >> branch", then that's expected: that's how it works. 
> >> 
> > 
> > Sorry, I meant pull request. Everyone else's code (2,800+ files and 250+ 
> > commits) are suddenly in the pull request I was working on (which had 8 
> > files and 4 commits). 
>
> Then my suspicion is that this isn't a rant on git, but rather on github 
> and its interface for creating "pull requests". I think you've simply 
> created a pull request with a "start point" that you didn't intend. 
>
> /M 
>
> -- 
> Magnus Therning  OpenPGP: 0x927912051716CE39 
> email: mag...@therning.orgjabber: mag...@therning.org 
>  
> twitter: magthe   http://therning.org/magnus 
>
> I have steadily endeavored to keep my mind free, so as to give up any 
> hypothesis, however much beloved — and I cannot resist forming one 
> on every subject — as soon as facts are shown to be opposed to it. 
>  — Charles Darwin (1809-1882) 
>

-- 
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] Yet more git madness

2016-11-01 Thread AD S

>
>
>
> I hate to step in here because usually messages like this are just 
> exercises in publicly venting frustration, rather than actual requests 
> for assistance. 
>
> However I don't quite understand what you mean, above.  Every single 
> branch in Git represents a history from the HEAD of the branch (where 
> the branch tag points) back to the beginning of the repository. 
>
> So, when you say "everyone else's commits are on my branch" it's not 
> clear what what that refers to, but if you mean that you are seeing all 
> the commits back to the start of the repo, not just the commits "on your 
> branch", then that's expected: that's how it works. 
>

Sorry, I meant pull request. Everyone else's code (2,800+ files and 250+ 
commits) are suddenly in the pull request I was working on (which had 8 
files and 4 commits). 

-- 
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] Yet more git madness

2016-11-01 Thread AD S


On Tuesday, November 1, 2016 at 8:59:41 PM UTC+10, Konstantin Khomoutov 
wrote:
>
> On Mon, 31 Oct 2016 18:42:14 -0700 (PDT) 
> AD S <ad...@radianweb.com.au > wrote: 
>
> > Man, I HATE git. 
> [...] 
> > Seriously, since using git about 60% of my time is spent fixing git 
> > problems instead of doing my job. So sick of this! 
>
> Please consider just f*cking reading any f*cking book on Git, mate, 
> before going off the hook and venting here. 
>
> Look, Git requires certain level of understanding and training before 
> you can be productive with it.  Sure, you heard stories that Git is 
> hard to use and (someone's pet) VCS system XYZ is way simpler.  This is 
> plain bullshit: any VCS system requires understanding of a host of 
> challenging concepts before you can actually use it properly.  They do 
> indeed differ in their UIs, and hence some systems other than Git could 
> suit the way your brain works better than Git but still you will 
> inevitably have to just bloody learn to use any of them, period. 
> No, really.  It's like trying to drive a car on a highway without first 
> completing the driver's school and then trying out to drive slowly in 
> suburbs. 
>
> You can think of this situation another way as well: we all here did 
> not born with innate Git knowledge; we all attained it through learning 
> and trying things out.  By extension, it means you should be perfectly 
> able to do just that. 
>
> By the way, I did see folks who gone like "yeah, I can use a 
> distributed version control system without knowing a heck about this 
> stuff: I'm just smart and my prior knowledge will help me to go about 
> that just fine!".  You know what?  Failing miserably at that, they were. 
>
> Come on, you can handle that, really.  Just learn. 
>

Yeah it was more a vent. I even tried to my post, but thought it would be 
dishonest too.

As for reading, it's true, I haven't read a proper book but I have read 
through and completed about a dozen online tutorials, both paid and free. I 
feel like I definetly do understand the concepts, it's more that everytime 
I try to use it I get an error I must spend time investigating. Sometimes 
its straight forward and obvious, other times it's bizarre, like above.

I take your point - theres no reason to whinge.


 

-- 
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] Yet more git madness

2016-10-31 Thread AD S
Man, I HATE git.

So I was working on a branch that had a total of 8 files. I needed to make 
adjustments to 3 of those files. I pulled, made the changes and pushed. 
Went to check on the branch on Git Hub and all of a sudden everyone else's 
commits are on my branch. Over 2,800 files and 250+ commits.

As usual I have no f*cking idea what I did or why this has happened. I 
follow the same pattern every time I usebut every time Git finds a way to 
ruin my day with random sh*t.

Seriously, since using git about 60% of my time is spent fixing git 
problems instead of doing my job. So sick of 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.


Re: [git-users] Try as I might, I just don't understand git. Can anyone please help me out?

2016-10-30 Thread AD S
Thanks, I'll check it out

On Tuesday, October 25, 2016 at 11:24:22 PM UTC+10, Nelson Efrain A. Cruz 
wrote:
>
> Have you read the pro git book? It's a really good and high quality book, 
> it sure will be better than a tutorial. It goes from the basics to really 
> deep subjects.
>
> El mar., 25 de oct. de 2016 a la(s) 04:32, Gergely Polonkai <
> ger...@polonkai.eu > escribió:
>
>>
>>
>> On Tue, Oct 25, 2016, 07:53 AD S <ad...@radianweb.com.au > 
>> wrote:
>>
>>> Honestly I must have watched hours of videos and completed 4 or 5 online 
>>> tutorials and it's still not clicking.
>>>
>>
>> Could you show us which ones? The errors
>>
>>>
>>> I understand the concept: that git is a sub-versioning tool. It makes 
>>> sense. I know why one would use it.
>>>
>>
>> Let's just call it Version Control System. subversion is another tool 
>> with the same purpose.
>>
>>>
>>> But every time I try to use it something just breaks or goes wrong or 
>>> blows up.
>>>
>>> This has happened just this week, for example:
>>>
>>>
>>>- Got error saying I was on the wrong branch, when I wasn't (this 
>>>just after a `git commit` command on a new branch).
>>>
>>> git never says you are on a wrong branch. Could you show us the exact 
>> error message ?
>>
>>>
>>>- After a being able to commit and push to github all last week, I 
>>>randomly got a 'Connection refused' message (github.com was still 
>>>up).
>>>
>>> There are tons of reasons that can lead to such an error message, most 
>> of them being related to network issues, not Git.
>>
>>>
>>>- Went to pull 7 files from a branch but for some reason, this time, 
>>>it pulled hundreds of files from the whole, broader project.
>>>
>>> As commits are snapshots of the whole “project”, you can not pull 
>> changes to only a set of files; you will get everything.
>>
>>>
>>>- A few times I got kicked out of the branch after a failed commit 
>>>and wouldn't let me return to branch because I had files waiting to be 
>>>committed. Only way was to hard reset. 
>>>
>>> What do you mean “kicked out”? As Git does not have access control built 
>> in, it cannot deny you from accessing a branch. Again, it would be helpful 
>> to see an error message .
>>
>>>
>>>- Saying there are merge conflict issues, but not showing what files 
>>>there are on.
>>>
>>> git-merge output will not necessarily show you which files have 
>> conflicts (although it is possible to parse it by eye). If you need such 
>> information, use git status.
>>
>>>
>>>- Files that were tracked randomly become un-tracked.
>>>
>>> That means they were removed from tracking either by you or by someone 
>> else, e.g. with git-rm
>>
>> These are a few, but in reality many similar problems happen throughout 
>>> the day which really impacts my productivity. When I started, and studied, 
>>> git I thought it would be pretty straight forward: pull the files you want 
>>> to work on, make changes, push them and if there is a conflict error fix 
>>> it. But it's complexity is beyond me.
>>>
>>> So, am I just cursed? What am I missing here?
>>>
>>> -- 
>>> 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+...@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+...@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.


Re: [git-users] Try as I might, I just don't understand git. Can anyone please help me out?

2016-10-25 Thread AD S
Hey, thanks for your reply.

I'll try to put up the error from my Stack Overflow questions, but I might 
not be able to remember them all verbatim. My answers in green below.


   - Got error saying I was on the wrong branch, when I wasn't (this just 
   after a `git commit` command on a new branch).


Error I got read something like:
Execution of target "commit" failed for the following reason: You are not 
on the correct branch.


"As commits are snapshots of the whole “project” you can not pull changes 
to only a set of files; you will get everything."

The project I am working on has about 30 sites (Drupal sub sites) with 
thousands of files. So you're saying, if I need to work on 1 changed file I 
will have to pull all these others?

What do you mean “kicked out”? As Git does not have access control built 
in, it cannot deny you from accessing a branch. Again, it would be helpful 
to see an error message

This happens after I get a merge error. I fix it, and then go to commit 
again but get the error: "You are not on the correct branch."Using git 
branch reveals I am no longer on my branch. If I try to switch back to my 
branch I get an error saying something like "Please, commit your changes or 
stash them before you can switch branches."

git-merge output will not necessarily show you which files have conflicts 
(although it is possible to parse it by eye). If you need such information, 
use git status.

>
>
> This does still happen when I use 'git status'

Sorry if this isnt really enough information. I'm really not sure what's 
going on.

On Tuesday, October 25, 2016 at 5:32:40 PM UTC+10, Gergely Polonkai wrote:
>
>
>
> On Tue, Oct 25, 2016, 07:53 AD S <ad...@radianweb.com.au > 
> wrote:
>
>> Honestly I must have watched hours of videos and completed 4 or 5 online 
>> tutorials and it's still not clicking.
>>
>
> Could you show us which ones? The errors
>
>>
>> I understand the concept: that git is a sub-versioning tool. It makes 
>> sense. I know why one would use it.
>>
>
> Let's just call it Version Control System. subversion is another tool with 
> the same purpose.
>
>>
>> But every time I try to use it something just breaks or goes wrong or 
>> blows up.
>>
>> This has happened just this week, for example:
>>
>>
>>- Got error saying I was on the wrong branch, when I wasn't (this 
>>just after a `git commit` command on a new branch).
>>
>> git never says you are on a wrong branch. Could you show us the exact 
> error message ?
>
>>
>>- After a being able to commit and push to github all last week, I 
>>randomly got a 'Connection refused' message (github.com was still up).
>>
>> There are tons of reasons that can lead to such an error message, most of 
> them being related to network issues, not Git.
>
>>
>>- Went to pull 7 files from a branch but for some reason, this time, 
>>it pulled hundreds of files from the whole, broader project.
>>
>> As commits are snapshots of the whole “project”, you can not pull changes 
> to only a set of files; you will get everything.
>
>>
>>- A few times I got kicked out of the branch after a failed commit 
>>and wouldn't let me return to branch because I had files waiting to be 
>>committed. Only way was to hard reset. 
>>
>> What do you mean “kicked out”? As Git does not have access control built 
> in, it cannot deny you from accessing a branch. Again, it would be helpful 
> to see an error message .
>
>>
>>- Saying there are merge conflict issues, but not showing what files 
>>there are on.
>>
>> git-merge output will not necessarily show you which files have conflicts 
> (although it is possible to parse it by eye). If you need such information, 
> use git status.
>
>>
>>- Files that were tracked randomly become un-tracked.
>>
>> That means they were removed from tracking either by you or by someone 
> else, e.g. with git-rm
>
> These are a few, but in reality many similar problems happen throughout 
>> the day which really impacts my productivity. When I started, and studied, 
>> git I thought it would be pretty straight forward: pull the files you want 
>> to work on, make changes, push them and if there is a conflict error fix 
>> it. But it's complexity is beyond me.
>>
>> So, am I just cursed? What am I missing here?
>>
>> -- 
>> 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+...@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] Try as I might, I just don't understand git. Can anyone please help me out?

2016-10-24 Thread AD S
Honestly I must have watched hours of videos and completed 4 or 5 online 
tutorials and it's still not clicking.

I understand the concept: that git is a sub-versioning tool. It makes 
sense. I know why one would use it.

But every time I try to use it something just breaks or goes wrong or blows 
up.

This has happened just this week, for example:


   - Got error saying I was on the wrong branch, when I wasn't (this just 
   after a `git commit` command on a new branch).
   - After a being able to commit and push to github all last week, I 
   randomly got a 'Connection refused' message (github.com was still up).
   - Went to pull 7 files from a branch but for some reason, this time, it 
   pulled hundreds of files from the whole, broader project.
   - A few times I got kicked out of the branch after a failed commit and 
   wouldn't let me return to branch because I had files waiting to be 
   committed. Only way was to hard reset. 
   - Saying there are merge conflict issues, but not showing what files 
   there are on.
   - Files that were tracked randomly become un-tracked.

These are a few, but in reality many similar problems happen throughout the 
day which really impacts my productivity. When I started, and studied, git 
I thought it would be pretty straight forward: pull the files you want to 
work on, make changes, push them and if there is a conflict error fix it. 
But it's complexity is beyond me.

So, am I just cursed? What am I missing here?

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