Re: [git-users] git cannot push
On Fri, 3 Jul 2015 06:58:17 -0700 (PDT) p...@greenlogix.eu wrote: but I cant acess any git-scm.com url since this morning, maybe it's down or something This book is called Pro Git. Google for it, and you'll find alternate sources (including paperback offers). still, I dont understand why a simple git init creates something that is not git (bare) client compatible Because it's more complicated than that. The chief reason is that all repos in Git are client, and pushing into a normal repo (where a programmer works on their files) might spoil the work of that programmer. I detailed this problem and possible solutions to it in my other post to this thread. -- 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 cannot push
Well if you are new to git it's reasonable that you don't understand the previous (and really elaborated) answers. But try to read some more chapters before saying that git it's that complex (in fact it is, but not that much). You may have more luck using github.com or bitbucket.com to share work (in a public or private way), use their tutorials to a quick start. Good luck with your final choice El vie, jul 3, 2015 11:41, p...@greenlogix.eu escribió: yeah I started reading it so to summurize on the windows CLI git add . git commit -m first commit [master (root-commit) 27331bc] first commit 81 files changed, 33489 insertions(+) create mode 100644 somefile ... create mode 100644 someotherfile git push origin --all ..'s password: Counting objects: 93, done. Delta compression using up to 8 threads. Compressing objects: 100% (91/91), done. Writing objects: 100% (93/93), 2.46 MiB | 3.33 MiB/s, done. Total 93 (delta 17), 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 inconsist ent remote: error: with what you pushed, and will require 'git reset --hard' to matc h 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 ..:/home//REPOSITORIES/Fizgig ! [remote rejected] master - master (branch is currently checked out) error: failed to push some refs to ':/home/webadmin/REPOSITORIES/...' -- 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.
Re: [git-users] git cannot push
It's seems that you are trying to push to a non bare repo, also in git you are always using branches but depending on how you use git you may not notice that. I think the better for you it's to read [1] it's not too large and it's pretty didactic. There it's no short answer for your question. [1] https://git-scm.com/book/en/v1 El vie, jul 3, 2015 10:15, p...@greenlogix.eu escribió: hello, I cloned a rep I installed on a ubuntu machine (empty rep) as I add files to that empty working copy, I can commit them (I use SourceTree) but once I do the push, I get an error, master - master (branch is currently checked out) I try to find some infos, but the more I dig, the less I understand Git I been told to either do a pull instead of a clone or do a init --bare but I dont want branching !! the goal is to have two people working on the same code and merging what they do to the repository (mater, origin , whatever, I dont even know what it is) can someone enlight me, I just don understand git at all svn was crap but way simpler to use 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. -- 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 cannot push
hello, I cloned a rep I installed on a ubuntu machine (empty rep) as I add files to that empty working copy, I can commit them (I use SourceTree) but once I do the push, I get an error, master - master (branch is currently checked out) I try to find some infos, but the more I dig, the less I understand Git I been told to either do a pull instead of a clone or do a init --bare but I dont want branching !! the goal is to have two people working on the same code and merging what they do to the repository (mater, origin , whatever, I dont even know what it is) can someone enlight me, I just don understand git at all svn was crap but way simpler to use 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] git cannot push
On Fri, 3 Jul 2015 06:15:23 -0700 (PDT) p...@greenlogix.eu wrote: hello, I cloned a rep I installed on a ubuntu machine (empty rep) as I add files to that empty working copy, I can commit them (I use SourceTree) but once I do the push, I get an error, master - master (branch is currently checked out) [...] I think that's how the tool you're using tells you about the problem dealed with in [1] and detailed in [2] (I suspect, plain Git would tell you a lot more information had you used it insteas of SoureTree). Basically (if I'm correct with the diagnosis) the problem is like here: * You have a normal, non-bare repository on your target (server) machine. * This means that repository has a work tree -- where the checked out files are kept, and where you modify them and from where you then stage these changes to be included into the next commit, and then commit. It seems, you have the branch master checked out there in the remote repo. * Now you're trying to *update* that branch master in the remote repo by your push from your local repo. It seems a logical thing to you until you try to imagine what would happen if Git allowed to do such a thing by default (it doesn't). What would happen is that suddenly the index (the staging area in which commits are prepared) is no more linked to the tip commit of the master branch it used to before you pushed. That's quite a nasty situation: for a start, you'll be unable to commit your changes, and `git diff --staged` will give weird results. That is, by this push you would pull the rug from under the feet of your work tree in the remote repository. What to do about this depends on what solution you're more comfortable with. I, for one, prefer pushing to a throw-away branch with a meaningless name such as temp -- then when I'm back at the remote repo I just do git merge temp and may be git branch -d temp afterwards to get rid of that branch. A corollary to this, is that if you're able to reach this local repo from your remote repo, just *fetch* your data from the local repo when you're back at your remote repo. That is, fetch instead of pushing. Another approach, quite often suggested, is to have a separate *bare* repository somewhere which is used for exchange by both regular repos. In this scheme, you would push to that shared reposory and then when back at the remote repository you'd fetch from that shared one and merge your changes into appropriate branch(es). IMO for one-man projects this approach is an overkill unless you have troubles pushing/fetching directly between all your workplaces (and if you have, you would typically use some public Git hosting such as Bitbucket or Github or others). Yet another approach is to tweak a special configuration parameter in the remote repo to allow pushes to the currently checked out branch. Given the situation -- you're doing your first baby steps with Git -- I'd strongly advise against this because after the first such push you will be scratching your head about what to do next. TL;DR My bit of advice: push to a temporary branch(es) in the remote repo and when back at it, merge from that branch/those branches into the corresponding local branch(es). You can then get rid of those temporary branches or keep them around for the next push etc. Or fetch, if possible/more convenient. 1. http://stackoverflow.com/q/3191400/720999 2. http://gitready.com/advanced/2009/02/01/push-to-only-bare-repositories.html -- 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 cannot push
thanks, but honestly I am new to git - bare, not bare, I just dont understand what this is - yes I checked out the master(or origin) from the remote repo, why do git people make it sound like something weird or unusual ?? - but if push is bad, how do I send my recently added/comitted files/changes to the master/origin/whatever - if pushing is better, then why add/checkout commands available ?? all I try to do is extremely simple, no fancy stuffs I just installed git , and created a repo and did git init A corollary to this, is that if you're able to reach this local repo from your remote repo, just *fetch* your data from the local repo when you're back at your remote repo. That is, fetch instead of pushing. here I dont follow you at all Another approach, quite often suggested, is to have a separate *bare* repository somewhere which is used for exchange by both regular repos. In this scheme, you would push to that shared reposory and then when back at the remote repository you'd fetch from that shared one and merge your changes into appropriate branch(es). that's it, I am going back to subversion, I dont have a Phd nor a NASA ingeneer degree these are way to complicated for just 2 person working on a same project this is geberish, and I repeat, why so much hassel for a first commit/push -- 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 cannot push
On Fri, 3 Jul 2015 07:33:59 -0700 (PDT) p...@greenlogix.eu wrote: [...] that's it, I am going back to subversion, I dont have a Phd nor a NASA ingeneer degree these are way to complicated for just 2 person working on a same project this is geberish, and I repeat, why so much hassel for a first commit/push Yeah, the very creator of Subversion summarized this all nicely: [1]. I'd still advise you to make a habit of going for a short walk to make a few gulps of fresh air before writing a response -- even if you're not satisfied, are irritated, angry and whatnot. Take your time to place yourself in the boots of the person who just tried to help and spent a hefty amount of their time doing so, and then received a reply claiming all the stuff they are versed in is gibberish and so on. I do not feel offended, just please try to understand that your personal inability or dissatisfaction with a technology is not a problem this list is concerned with or interested about. Really, when you want to dump something like this to a mailing list, please tweet or write a blog post instead. Have fun. 1. http://blog.red-bean.com/sussman/?p=79 -- 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 cannot push
thanks for your answer but I cant acess any git-scm.com url since this morning, maybe it's down or something still, I dont understand why a simple git init creates something that is not git (bare) client compatible On Friday, July 3, 2015 at 3:51:22 PM UTC+2, Nelson Efrain A. Cruz wrote: It's seems that you are trying to push to a non bare repo, also in git you are always using branches but depending on how you use git you may not notice that. I think the better for you it's to read [1] it's not too large and it's pretty didactic. There it's no short answer for your question. [1] https://git-scm.com/book/en/v1 El vie, jul 3, 2015 10:15, p...@greenlogix.eu javascript: escribió: hello, I cloned a rep I installed on a ubuntu machine (empty rep) as I add files to that empty working copy, I can commit them (I use SourceTree) but once I do the push, I get an error, master - master (branch is currently checked out) I try to find some infos, but the more I dig, the less I understand Git I been told to either do a pull instead of a clone or do a init --bare but I dont want branching !! the goal is to have two people working on the same code and merging what they do to the repository (mater, origin , whatever, I dont even know what it is) can someone enlight me, I just don understand git at all svn was crap but way simpler to use 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+...@googlegroups.com javascript:. 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] git cannot push
yeah I started reading it so to summurize on the windows CLI git add . git commit -m first commit [master (root-commit) 27331bc] first commit 81 files changed, 33489 insertions(+) create mode 100644 somefile ... create mode 100644 someotherfile git push origin --all ..'s password: Counting objects: 93, done. Delta compression using up to 8 threads. Compressing objects: 100% (91/91), done. Writing objects: 100% (93/93), 2.46 MiB | 3.33 MiB/s, done. Total 93 (delta 17), 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 inconsist ent remote: error: with what you pushed, and will require 'git reset --hard' to matc h 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 ..:/home//REPOSITORIES/Fizgig ! [remote rejected] master - master (branch is currently checked out) error: failed to push some refs to ':/home/webadmin/REPOSITORIES/...' -- 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.