Re: [git-users] total newbie question
On Wednesday, August 3, 2011, Michael Hazen michaelsha...@gmail.com wrote: So impossible or not, What I see is a changed file showing up in the master after a commit but not a merge. This is especially obvious if a file is added. I may be misunderstanding something, however. How are you creating a new branch? How do you commit a change to that branch? -- -PJ -- You received this message because you are subscribed to the Google Groups Git for human beings group. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
Re: [git-users] git tag -l - where are the associated
On Saturday, August 13, 2011, Phlip phlip2...@gmail.com wrote: tx guy- - got a list of tags? $ git tag -l -moar TagOne 9a03e83hashhashhash TagTwo 9b03e83hashhashhash TagThree 8ea330ahashhashhash ? Just curious... for x in $(git tag -l); do echo $x\t$(git rev-parse $x) done ? -- -PJ -- You received this message because you are subscribed to the Google Groups Git for human beings group. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
Re: [git-users] git pull origin branch
On Sunday, August 21, 2011, Mark Liversedge liverse...@gmail.com wrote: Hi, Dumb question. I'm working on a branch locally that is also over at github. I fetch the latest from github with: Make sure I'm clean $ git checkout branch $ git reset --hard origin/branch $ git pull origin branch Make changes and commit then $ git push origin branch But when I pull other folks commits I get a merge commit and that gets pushed up to github. I've come to the conclusion that my pull/push commands are flawed and I should do this differently. How *should* I be doing this? TIA, Mark There's nothing necessarily wrong with merge commits, but if you want to straighten out your history before you push: $ git fetch origin $ git rebase origin/branch If you had to resolve any conflicts in the merge commits, you'll have to do that again during the rebase. -- -PJ -- You received this message because you are subscribed to the Google Groups Git for human beings group. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
Re: [git-users] Branches and workflow
On Friday, August 26, 2011, gitlist gitl...@myword.co.uk wrote: Thanks for the reply. It's not really bugfixes that's the issue, it's how to handle overlapping development of two features. Feature 1 is being tested by the customer; I need to start work on Feature 2. But where to begin the Feature 2 branch? I would think master, or the most stable point that has all the changes Feature 2 needs. What I've realised today is that it's quite possible that Feature 2 (much simpler) could be tested and deployed long before Feature 1 - IOW overtake it. I can't risk any of the unfinished code from Feature 1 going on the production server, so I have to start Feature 2 from the current master, as deployed, even if that means having to pull out some work which is on the Feature 1 branch. I suppose I should not have allowed so much work to build up on the Feature 1 branch. Indeed, it sounds like in hindsight that work wasn't really part of Feature 1, and maybe should have been on its own branch. -- -PJ -- You received this message because you are subscribed to the Google Groups Git for human beings group. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
Re: [git-users] Viewing html
On Tuesday, September 13, 2011, er arobase...@gmail.com wrote: -rw-r--r-- 1 root staff 11 Aug 28 21:43 c_array/doc/html/c_array_HTML.manifest -rw-r--r-- 1 root staff 12998 Sep 2 21:58 c_array/doc/html/index.html drwxr-xr-x 4 root staff 136 Aug 28 17:32 c_array/doc/html/ uid=502(er) gid=20(staff) groups=20(staff),101(com.apple.sharepoint.group.1),204(_developer),100(_lpoperator),98(_lpadmin),81(_appserveradm),80(admin),79(_appserverusr),61(localaccounts),12(everyone),401(com.apple.access_screensharing) Were you running as root when you checked out? The files are owned by root, and only root has permission to delete them. Assuming you have permission to run sudo, you might want to run: sudo chown -R er . to reclaim ownership of all the files in the directory. -- -PJ -- You received this message because you are subscribed to the Google Groups Git for human beings group. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
Re: [git-users] Why does git log same-hash same-hash file return two commits?
On Thu, Oct 6, 2011 at 9:27 AM, Konstantin Khomoutov flatw...@users.sourceforge.net wrote: The correct way instead is to do $ git log 7de0e15^..7de0e15 myfile that is, the set of changes between the (first) parent of 7de0e15 and 7de0e15. Note: That causes an error if 7de0e15 is the root commit. There'll be no such commit as 7de0e15^. (Yes, I've been bitten by that before.) -PJ -- You received this message because you are subscribed to the Google Groups Git for human beings group. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
Re: [git-users] Re: Why does this happen (unexpected git behaviour)
On Sat, Nov 12, 2011 at 9:14 PM, tombert tomb...@live.at wrote: Interesting - but I found this explanation in the manual: --merge When switching branches, if you have local modifications to one or more files that are different between the current branch and the branch to which you are switching, the command refuses to switch branches in order to preserve your modifications in context. (see http://schacon.github.com/git/git-checkout.html) So in my opinion it should have refused to switch branches!? Look again at the steps. There were no commits after the one branch was made from the other, so there can't have been any files that were different between the two branches. -- You received this message because you are subscribed to the Google Groups Git for human beings group. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
[git-users] Git revision number
I'm looking for something in Git analogous to the revision numbers in Subversion. Pretty much exactly what you get from `git describe', but I don't want it to be dependent on any tags or refs. Is there any way to get something like that out of Git? -PJ -- You received this message because you are subscribed to the Google Groups Git for human beings group. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
[git-users] Re: Git revision number
On Saturday, November 19, 2011, Konstantin Khomoutov flatw...@users.sourceforge.net wrote: On Fri, 18 Nov 2011 12:20:03 -0800 PJ Weisberg p...@irregularexpressions.net wrote: The more I think about it, though, the more I think I could probably get away with using a timestamp for what I had in mind. I'm curious about what do you have in mind; could you please explain? A while ago, someone at $work made a mini-webapp that shows a chart of which versions of various projects are deployed to which QA servers and which customer sites. Out-of-date versions (with a lower version number) are highlighted. One of the newer projects that another team created is showing ERR for the version, because it has a Git SHA1 instead of an SVN revision number. I was looking for the minimal change I could make to make it Git-compatible, which I thought would be a version number like what's shown in `git describe'. (Ideally I didn't want to disrupt the layout by using something much wider than our current 4-digit SVN rev numbers, but that's not really important.) Since the main usecases are answering questions like: Is $foo up to date? Which customers are WAY out of date? Does $customer_site have the bugfix we made last week? I'm pretty sure a datestamp would be enough for the at-a-glance view. -- -PJ -- You received this message because you are subscribed to the Google Groups Git for human beings group. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
Re: [git-users] Checking in another user's local changes to a remote repository without his password?
On Sun, Jan 22, 2012 at 12:12 AM, dspfun dsp...@hotmail.com wrote: Hi! The setup is that there is a remote repository at some site, and then each person/developer has his own local clone of the remote repository. To push any changes from a local repository to the remote repository a password is needed since ssh is used. How do I checkin another user's changes, which he has done in his local repository only, to the remote repository? The reason for this could be that the person who has done the changes is on a leave and don't have access to the environment. Should i first make a clone the other user's local repository and then push it in to the remote repository? Or Should I first make a new clone of the remote repository and then pull the other user's local repository, and then push it all to the remote repository? Or use some other strategy? Either of those will work, but you don't actually have to make a new clone. Just pull from his repository to yours, then push to the remote repository. Of course, all three options are practically identical. Pull from one place, push to another. Nothing complicated about it. :-) -PJ -- You received this message because you are subscribed to the Google Groups Git for human beings group. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
Re: [git-users] need clarification on interactive rebase, please
On Wednesday, March 21, 2012, Les Nightingill codehac...@comcast.net wrote: Solved! (not entirely sure why, though!). Posting the solution here for future Googlers. The solution is on StackOverflow http://stackoverflow.com/questions/4737381/git-editor-not-working-with-macvim The solution is this configuration: git config --global core.editor mvim -f In general, any editor that opens itself *in the background* is not going to work. When the editor hands control back to Git, Git thinks it's because you're done editing. Any other command-line tool that uses $EDITOR will have the same issue. I'll bet you saw a blank file because Git deleted the file (which it thought you were done with) before mvim got around to opening it. -- -PJ Gehm's Corollary to Clark's Law: Any technology distinguishable from magic is insufficiently advanced. -- You received this message because you are subscribed to the Google Groups Git for human beings group. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
[git-users] GIT: cloning from godaddy.
On Sunday, March 25, 2012, Whitehorse06 ramsfor...@gmail.com wrote: a) git clone ssh://ftpu...@118.139.xxx.5/~/git/Read me.txt (note xxx) is changed for privacy reasons. I get the following error message Cloning into Readme.txt... fatal: Invalid gitfile format: /var/chroot/home/content/85/91334343/ git/Readme.txt fatal: The remote end hung up unexpectedly Ignoring for a moment the fact that README.txt and Readme.txt are two totally different files, they both appear to be text files rather than Git repositories. I think the command you actually want is: git clone ftpu...@118.139.xxx.5:~/testrepo -- -PJ Gehm's Corollary to Clark's Law: Any technology distinguishable from magic is insufficiently advanced. -- You received this message because you are subscribed to the Google Groups Git for human beings group. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
Re: [git-users] push origin master/branch
On Fri, Apr 13, 2012 at 4:47 PM, THUFIR HAWAT hawat.thu...@gmail.com wrote: I find this terminology confusing. Doesn't the master contain the branch? So, why can't I push a branch against the master? If I've checked out branch x, the push will be applied to that branch, I would expect. You're not the only one who expects that, which is why the default will be changing in the very near future so that it behaves that way. (The issue has been discussed recently on the main git mailing list, g...@vger.kernel.org.) For now, the default meaning of 'git push' is to push all branches that exist both locally and on the remote. If you want it to instead push the current branch to a branch of the same name on the remote, run git config --global push.default current. -PJ Gehm's Corollary to Clark's Law: Any technology distinguishable from magic is insufficiently advanced. -- You received this message because you are subscribed to the Google Groups Git for human beings group. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
Re: [git-users] beginner branch question
On Tuesday, June 26, 2012, Mostafa Alshrief mostafa_alshr...@yahoo.com wrote: If any of the uncommitted changes collide with files changed between branches, it will refuse to switch, and ask you to stash the changes first what do you mean by collide with files..? If A.txt on master is different from A.txt on develop, then when you switch branches Git must change A.txt on disk. If you have uncommited changes, so that A.txt on disk is different from A.txt on develop, then Git will REFUSE to switch branches if doing so would require changing A.txt. That's what was meant by a collision. However, if A.txt on master is the same as A.txt on develop, then it doesn't need to be changed when you switch branches. Git is able to switch without corrupting your local changes. -- -PJ Gehm's Corollary to Clark's Law: Any technology distinguishable from magic is insufficiently advanced. -- You received this message because you are subscribed to the Google Groups Git for human beings group. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
Re: [git-users] git server problem
On Monday, July 2, 2012, Avner Tamir avner.ta...@hp.com wrote: ,Hi I’ve set git server on RHEL 5.6 box, running on httpd we’ve encountered the following scenario several times User A pushes to remote User B pull from remote User B sees the sources pushed by user A as to be committed in his local repository That sounds like a reasonable description of what pull does. What did you expect/want to see? -- -PJ Gehm's Corollary to Clark's Law: Any technology distinguishable from magic is insufficiently advanced. -- You received this message because you are subscribed to the Google Groups Git for human beings group. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
Re: [git-users] git branching from tags
On Monday, July 2, 2012, jack sparrow dafs...@gmail.com wrote: From the git repo, i created a new branch1 with the existing tag tag1. i made some changes to a set of files, filea, fileb. If i run git status it shows that the filea and fileb are modified, so far good. Now i created another branch2 with the existing tag tag2. If i go toa filea, the file has the changes i made in the branch1. since the changes i made are commited, i was expecting the file to be without the modfications that was made in other branch. am i missing something ? Maybe, but it's hard to say without knowing specifically what commands you ran. -- -PJ Gehm's Corollary to Clark's Law: Any technology distinguishable from magic is insufficiently advanced. -- You received this message because you are subscribed to the Google Groups Git for human beings group. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
Re: [git-users] beginner branch question
On Tuesday, July 3, 2012, jack sparrow dafs...@gmail.com wrote: I don't understand why each branch has to be related to one another. Here's my thought, i should be able to create multiple branches each possibly with certain tag version. The work done in each branch can be on completely different files or the same files. Once changes to a branch is complete they can be commited and pushed to the master. These changes can be pulled in to the other branch by pulling the changes from the master. If there are any conflicts they can be resolved manually. This way i can work parallely on multiple things without affecting from each other. I was of this opinion when i first came to know about git branching. Git isn't going to discard your uncommited changes without being told to do so, and it's not going to commit them without being told, either. You can use 'git stash' if you need a temoprary place to put your changes while you work on something else. -- -PJ Gehm's Corollary to Clark's Law: Any technology distinguishable from magic is insufficiently advanced. -- You received this message because you are subscribed to the Google Groups Git for human beings group. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
Re: [git-users] git erase everything
On Fri, Jul 6, 2012 at 3:55 AM, lem torov ulem...@gmail.com wrote: i was using netbeans ide and as CVS i was using git included into IDE. once i lanch standalone git-msys in my project directory git branch showed me * no branch master you are not in any branch i did git checkout master and i lost like 5 weeks of my work. if there is any way to restore it? If I was a jerk, I would give you the accurate-but-unhelpful advice that you should run the command Git told you to run in the warning message it printed when you did 'git checkout master'. If I was trying to be helpful I might try to teach you what a detached HEAD is and what the reflog does, but that misses the fact that you're panicking about losing five weeks worth of work and not interested in learning anything until you've found it again. So I'll give you a step-by-step: $ git checkout master Because I'm assuming you want these commits you're trying to recover to be on the 'master' branch. $ git reflog Look in the output for the commit message of the last change to the branch you're trying to restore $ git reset --merge abc123 Here, 'abc123' is the sha1 of the commit you noted in the previous step. You can replace '--merge' with '--hard' if there are no changes in your current working directory that you want to preserve, but I'm recommending the safer option for people who find this post on Google in the future. :-) That will leave the 'master' branch pointing at the commit 'abc123'. (In Git, branches and tags are simply pointers to specific commits.) Now in the future, if you 'checkout' anything other than a branch, remember to 'checkout' a branch again before you commit anything you want to keep! -PJ Gehm's Corollary to Clark's Law: Any technology distinguishable from magic is insufficiently advanced. -- You received this message because you are subscribed to the Google Groups Git for human beings group. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
Re: [git-users] git contents model
On Fri, Jul 13, 2012 at 5:38 AM, Angelo Borsotti angelo.borso...@gmail.com wrote: Hi, I guess that a tarball would be the distro of the project, i.e. what is deployed, while a released project should contain the .git repo, with all the history in it so as to let future developers have all the data to start a new development. In such a case what is not needed are the files since they are also contained in the .git repo. I was wandering why there should instead be a need to have also the files (note that a directory with a .git in it and no other files is a project with a pending change in it that is the removal of all files, as reported by git status). Ah, you're talking about a bare repository, with no working directory. That's actually the most common way to set up a repository that's meant to be distribution point. In fact, if the repository is *not* bare, then by default you won't be able to push to the branch that's checked out. To create a bare repo, use 'git init --bare' or 'git clone --bare other-repo'. To make an existing repo bare, use 'git config --bool core.bare true', move the .git directory and give it a better name (i.e., 'mv .git ../my-project.git'), then you can delete the old working directory. (Credit to http://stackoverflow.com/questions/2199897/git-convert-normal-to-bare-repository for part of this answer.) -PJ Gehm's Corollary to Clark's Law: Any technology distinguishable from magic is insufficiently advanced. -- You received this message because you are subscribed to the Google Groups Git for human beings group. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
Re: [git-users] git contents model
On Sat, Jul 14, 2012 at 12:12 AM, Angelo Borsotti angelo.borso...@gmail.com wrote: Hi P.J. exactly. That is the answer. Surfing the web I have seen that bare repositories are supported only in git 1.7. Since it is (and was) not possible to push to a non-bare repository, I wander how the community used git pre-1.7. No one ever used a remote repository to push files since now? I don't know the history in detail, but I know the restriction against pushing to non-bare repositories is relatively recent. Maybe the part that was new in 1.7 was the config option that lets the repository know that it's bare and can therefore accept pushes? I can't think of any other reason for the bare/non-bare distinction to be kept in the repository itself. -PJ Gehm's Corollary to Clark's Law: Any technology distinguishable from magic is insufficiently advanced. -- You received this message because you are subscribed to the Google Groups Git for human beings group. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
Re: [git-users] force merge to fix conflicts?
On Thursday, August 9, 2012, THUFIR HAWAT hawat.thu...@gmail.com wrote: I think that I do want to zap the master branch; git reset --hard origin will delete everything in origin, or just everything in master on origin? In this case, I'm using github. 'git reset' always affects the branch you have checked out, not anything on the remote. What it does is *move* the current branch pointer. In Git, history is represented as a graph of commits, and a branch or a tag is a pointer to a particular commit. If your history looks like this: 7daf362 * [master] |\ 3b1d46c | * [other-branch] | |\ |/ / c516377 | * 8c5c842 * | [etc...] and you have 'master' checked out, then after you run 'git reset c516377' it will look like this: 3b1d46c * [other-branch] |\ c516377 | * [master] 8c5c842 * | [etc...] 7daf362 is still recoverable from the reflog for (by default) at least 90 days, but but eventually it will be deleted by the garbage collector. -- You received this message because you are subscribed to the Google Groups Git for human beings group. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
Re: [git-users] Why git merge always ask for a commit message?
On Tuesday, September 4, 2012, Mauro mrsan...@gmail.com wrote: There is a way now to make a fast-forward merge? Or I must delete brand devel and recreate? Thanks for your answers and your patience. Just merge master into devel -- -PJ Gehm's Corollary to Clark's Law: Any technology distinguishable from magic is insufficiently advanced. -- You received this message because you are subscribed to the Google Groups Git for human beings group. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
Re: [git-users] about git commit -m add the more than two lines log
On Thu, Oct 11, 2012 at 7:58 PM, lei yang yanglei.f...@gmail.com wrote: I know git commit -m somethingsomething will give the git info in the git log but I don't know how to write some thing with more than two line some thing like something something something something something something in the git log Try just git commit You should hardly ever need to use -m. -PJ Gehm's Corollary to Clark's Law: Any technology distinguishable from magic is insufficiently advanced. -- You received this message because you are subscribed to the Google Groups Git for human beings group. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
Re: [git-users] Unable to push
On Monday, November 5, 2012, kramer.newsreader kramer.newsrea...@gmail.com wrote: * nov20127fc7d04 [origin/nov2012] Little more javadoc ... remotes/origin/nov2012 7fc7d04 Little more javadoc Same commit on both the local and remote branches. It looks like you have nothing to push, or you've already pushed it. -- -PJ Gehm's Corollary to Clark's Law: Any technology distinguishable from magic is insufficiently advanced. --
Re: [git-users] Track changing imports when using git mv on Python project
On Fri, Nov 16, 2012 at 3:13 PM, Mario supermari...@googlemail.com wrote: I am currently totally rearranging a python project, which mainly means changing file names and moving folders and files. Therefore I user git mv and changes go very fast. Unfortunately I have to fix all the hanged imports, which is really a lot when having more than 100 files. Is there any possibility to make it easier for me? Refactoring is the job of your IDE, not your version control system. -PJ Gehm's Corollary to Clark's Law: Any technology distinguishable from magic is insufficiently advanced. --
Re: [git-users] Git rebase for cleanup, after pushing
On May 30, 2013 6:32 PM, Paul Smith p...@mad-scientist.net However, I've already pushed my branch to master. I know rebasing stuff you've already pushed is considered a no-no in general, but I can't avoid it. Does anyone have suggestions for how to make this work better? Should I be rebasing to a brand new branch, then merge that to master? Just rebase directly to master? None of the above? Something else entirely? I don't understand why you don't do all this cleanup *before* you merge into master. There's no problem with rebasing published history per se, only with rebasing history that someone else might have pulled into their own history. You can rebase to your heart's content as long as you're on your own branch, even of it does have to live on a remote 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/groups/opt_out.
Re: [git-users] Clarification Regarding Git Commit Granularity
On Jun 6, 2013 9:59 PM, Greg Chetcuti g...@chetcuti.com wrote: So, one thing I'm still a bit fuzzy on is the recommend granularity of commits, and I'm wondering if anyone can help me out. For example, let's say we're adding a new feature to a software application that's going to require two small updates to the code on 10 pages, what would the recommended commit process be? - Perform both updates on all 10 pages and commit everything all at once (1 commits) - Perform 'small update #1' on all 10 pages and then commit, then do the same for 'small update #2' (2 commits) - Make both of the small updates to each page and then commit by page (10 commits) - Update and commit every single change, in every file (20 commits) etc. If I understand correctly, you're making two logical changes, each of which touches several files. Then of course you'll want to make two commits. Put them in one commit and you're unnecessarily tying together unrelated things. Break them up into ten or twenty commits and you have a bunch of half-done changes that don't actually work and need to be combined with other commits before they actually make sense. By putting each change into a single commit you have a piece of working software after every revision, which makes it easier to bisect when diagnosing a bug, for example. -- 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/groups/opt_out.
Re: [git-users] Difficulty adding a symbolic link
On Jun 13, 2013 11:45 AM, Dale R. Worley wor...@alum.mit.edu wrote: . The difficulty is that git add seems to not add specific files, depending on how they are specified as arguments to git add. In particular, /dev/dvd (which is a symbolic link) can be added with git add ../../dev/dvd but not with git add /dev/dvd. On the other hand, /etc/hosts (an ordinary file) can be added with either git add /etc/hosts or git add ../../etc/hosts. I would bet that /dev/dvd is on a different filesystem than the repository, and /etc/hosts is not. Not that that explains/solves your problem; I'm just speculating on what the difference might be. Git has no problem with symlinks in a more traditionally laid-out repository, so I doubt it's that. This is beyond the scope of git-users. Wonkyness like this should be discussed on the Git developers mailing list: g...@vger.kernel.org -- 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/groups/opt_out.
Re: [git-users] Applying patch to Drupal module
On Jun 24, 2013 8:08 AM, PJ Weisberg pjweisb...@gmail.com wrote: Try !git apply example.patch. Not just for Git, but for any commands you want to run on the remote machine. Oops, I remembered that wrong. That's the syntax for running a local command without exiting the ftp client. If you want to run commands remotely, you'll have to actually use SSH. File transfer protocol is for transferring files. -- 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/groups/opt_out.
Re: [git-users] Applying patch to Drupal module
On Jun 24, 2013 8:20 AM, Konstantin Khomoutov flatw...@users.sourceforge.net wrote: On Mon, 24 Jun 2013 08:08:49 -0700 PJ Weisberg pjweisb...@gmail.com wrote: [...] Are you trying to run git commands inside an ftp client, rather than in a shell? Try !git apply example.patch. Not just for Git, but for any commands you want to run on the remote machine. Sorry, but what is this supposed to mean? In a typical interactive Unix shell that `!' would re-execute the last command which name begins with the string git. Did you mean FTP client then? But since when FTP started to support remote command execution? The `sftp` program of the OpenSSH suite supports `!' prefix as a way to pass commands to a local shell rather than interpreting them, but the OP did not talk about SFTP but rather about FTP, and in any case it's a local shell which gets executed, not remote. Yeah, I remembered that immediately after I posted. That function always seemed odd to me--why would I log into a remote machine and run local commands?--so I often forget that it works that way. And I'm trying to use an ftp client as if it were a remote shell is the only interpretation of the OP's situation that made sense to me. I didn't watch the video, though. ;-) -- 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/groups/opt_out.
Re: [git-users] git bisect fixed/unfixed option
On Jul 9, 2013 10:11 AM, Chemsi Mehdi chmsme...@gmail.com wrote: Dear Git expert, I wonder how adding to git bisect fixed/unfixed options. This in order to find a good patch fixing a bug and not to find the bad commit. This is helpful for me. I am working with git version 1.7.11.7 Can you please advise on how adding these commands to git bisect. Many thanks in advance. Mehdi Why don't you just write your test so that it fails if the bug does *not* occur? I.e., mark the commit as good if it has the bug, so that the first bad commit is the one that fixed it. -- 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/groups/opt_out.
Re: [git-users] git error when trying to push one commit
On Jul 10, 2013 12:07 PM, Richard Marais richardmar...@gmail.com wrote: ... Here is the list of commits, not the position of 72ba712: I've noted it. It's not a descendant of origin/master. Pushing it as origin/master would effectively discard 3a55dca. I believe what you want to do is cherry-pick 72ba712 onto a new branch based on the latest origin/master, then push that back to origin/master. Richard@RICHARD-PC /e/Work/MH (master) $ git lol * eec2ab2 (HEAD, master) Merge branch 'master' of file:///V:\ |\ | * 3a55dca (origin/master) comments * | 72ba712 comments * | bc55eb5 comments * | c2aa448 Merge branch 'master' of file:///V:\ |\ \ | |/ | * 930430f comments * | fc7a55b comments * | fd401a5 comments -- 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/groups/opt_out.
Re: [git-users] error during git pull
On Aug 26, 2013 10:46 PM, dexter ietf dexter.i...@gmail.com wrote: i thought this would be the cause and none of my commit has one/tgt tracked, i confirmed it by running 'git log' which doesn't list 'one/tgt' as a committed file. so i'm sure i haven't committed that file. That means that if git overwrote it with the version from the other branch, your uncommited version would be lost. Git tries to be very careful about not losing your work like 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/groups/opt_out.
Re: [git-users] restrict history/messages on push?
On Sep 26, 2013 12:05 AM, Gergely Polonkai gerg...@polonkai.eu wrote: Hello, first of all, Fred should stop using such commit messages :-) Seriously speaking, I think that's where git rebase -i comes in. Before pushing, rebase on the last public commit, and edit/squash the unnecessary commits. This is exactly what I would recommend for Fred. Keep in mind that Fred's own private history will also have only the sanitized commits. That might be a good thing. -- 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/groups/opt_out.
Re: [git-users] Switching to another hash on branch
On Oct 16, 2013 5:51 AM, Roy Vardi roy.va...@gmail.com wrote: Say I have a commit hash which is shared by two branches (I cherry-picked it from one branch to the other). The hash is a SHA-1 hash of all the commit metadata: tree, timestamp, *parent*, etc. A commit created by cherry-picking will have a different parent (history), a different tree (assuming some files in one branch are different from the other branch), and other different metadata. So it will have a different hash from the commit or was based on. -- 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/groups/opt_out.
Re: [git-users] How to merge seperate repositories as branches in new repository?
On Oct 18, 2013 12:29 PM, Casper Schmidt kalle.pri...@gmail.com wrote: My question is then: Is there any way to merge multiple repositories into a single repository but in their own branch. I have found a few guidelines using multiple remotes and simple merge but this merges the history into the master branch every time I try. Also some guidelines talk about merging repositories into seperate directories, but that is not really what we want. If I understand correctly (which I might not) , you don't actually want to merge anything. You want to fetch from multiple remotes, then make local branches for each of them. That's just 'git branch myNewBranch someRemote/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/groups/opt_out.
Re: [git-users] Empty Commit?
On Oct 22, 2013 11:21 AM, Vicki Kozel vickiko...@gmail.com wrote: This is what git status shows after I modified the file and ran git add: git status # On branch fix99 # Changes to be committed: # (use git reset HEAD file... to unstage) # # modified: COMMON/pom.xml # This is what git commit with amend shows: git commit COMMON/pom.xml --amend # On branch fix99 # No changes You asked to amend the most recent commit, but doing so would make it empty. You can repeat your command with --allow-empty, or you can remove the commit entirely with git reset HEAD^. It's because you added the --amend option. You're telling git that you want a commit that introduces no changes, and git is asking if you're really sure about that, and suggesting something you might want to do instead. It sounds to me like what you want to do is just not merge the commit into master. I.e., do nothing. Why are you even working with this branch if you're just trying to discard it? -- 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/groups/opt_out.
Re: [git-users] Empty Commit?
On Oct 22, 2013 5:39 PM, PJ Weisberg p...@irregularexpressions.net wrote: On Tue, Oct 22, 2013 at 1:55 PM, Vicki Kozel vickiko...@gmail.com wrote: Hi Marcelo, I do not want to abandon this change, I want to keep it and the commit unchanged. I think this is a good practice in Gerrit to keep adding patches to the same change - to the same commit - which allows for better change tracking and tighter code gating. You can't add patches to the same commit. A commit is one snapshot. If you do a normal commit, your branch will have two commits: the one with that introduces the bad change, and another one that undoes it. If you do a commit with '--amend', like you're trying to do now, your branch will have only one commit, which introduces no changes whatsoever. You can certainly do that. Git tells you how in the error message you quoted. It just seems like a silly thing to do, so Git is asking you if you're really sure you want to do it. If I were in your place, I would use --amend, not to undo the commit, but to fix it so that it does what it was intended to do without whatever bug was uncovered. That way the history would show one state where the feature was not implemented, then another where it was implemented. The --amend serves to overwrite or replace the intermediate state, where the feature is implemented incorrectly. -- 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/groups/opt_out.
Re: [git-users] Another easy merge question
On Oct 30, 2013 10:40 AM, Eric Fowler eric.fow...@gmail.com wrote: Given that I have already made a commit of my new changes in master (but not a push), is this still the way to go? That'll work fine. You could also do 'git checkout origin/master' to leave your local master branch the way it is. That puts you into a detached HEAD, where you're not on any local branch, so you'll want to use git checkout again to move back to a branch (or create a branch) before you commit anything. -- 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/groups/opt_out.
Re: [git-users] Re: git clean help
On Nov 12, 2013 7:32 PM, David R cdrtz1...@gmail.com wrote: $ git status # On branch master # Untracked files: #(use git add file... to include in what will be committed) # # Spoon-Knife/ nothing added to commit but untracked files present (use git add to track) the spoon-knife is what im trying to clean through git Are there files in that directory that are covered by .gitignore rules, maybe? -- 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/groups/opt_out.
Re: [git-users] After git -am commit changed files are not in repo
On Nov 14, 2013 7:53 PM, Dave Kennedy davek1...@gmail.com wrote: I have a git repository cloned to an AWS server. But my commits are not showing up in the repository even though there is no error when I commit a file. Is it OK to make commits as root or do I need to login with a git user name ? root@ip-xxx-xx-x-xxx:/var/www/myproject# git config --global user.name'me' root@ip-xxx-xx-x-xxx:/var/www/myproject# git config --global user.email ' m...@my.com' root@ip-xxx-xx-x-xxx:/var/www/myproject# git commit -am 'test2commit' [master b506b96] test2commit 1 files changed, 0 insertions(+), 215 deletions(-) delete mode 100644 myproject#/protected/runtime/application.log root@ip-xxx-xx-x-xxx:/var/www/myproject# git log commit b506b96c093c9ee9ec8f940ceb7964171b4827f5 Author: me m...@my.com Date: Fri Nov 15 03:09:52 2013 + test2commit root@ip-1xxx-xx-x-xxx:/var/www/myproject# git status -s root@ip-xxx-xx-x-xxx:/var/www/myproject# I must be missing something. You made a commit, then you ran git log and it showed you that your commit was made. Everything's fine, right? -- 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/groups/opt_out.
Re: [git-users] security issue with public keys
On Nov 17, 2013 8:43 PM, stoici...@aol.com wrote: I generated ssh public keys on server, uploaded it to github repository, so that I can deploy my project to the server. My question is if someone has access to the server and they log in and view the ssh keys, can they somehow read or write to the git repository on github? The github repository is currently set to private and I don't want anyone to read or write to it. If some process on the server is able to read the repository using only that key, of course anyone else who has that key will be able to use it. If the SSH key itself isn't encrypted so that you need to enter a password whenever you use it, you can basically think of that file as being a 256-character long password in a text file. (Conceptually, anyway. Mechanically it works very differently.) -- 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/groups/opt_out.
Re: [git-users] Re: Merging from pull
On Dec 6, 2013 7:32 PM, Phillip Tutt phil.t...@gmail.com wrote: This is the bit that doesn't make sense: 1. Remote last log entry: 2013-11-04 Phil ticketing and questions working admintemplate 4a09c3 2. Desktop last log entries, note, the last commit was after I had to fix the merge conflicts and then I committed. But looking at the log there shouldn't need a merge, since the latest commit the Remote and Desktop should just be ticketing and questions working: $ git log commit b1a68b9de0c5097810ffd6c4eb9f006e4a090616 Merge: 53a9da3 4a09c3c Author: Phil x...@gmail.com Date: Thu Dec 5 22:07:41 2013 +1100 fixed merge conflicts commit 4a09c3c9093b53989e4fff5cc392299364315402 Author: Phil x...@gmail.com Date: Mon Nov 4 16:33:57 2013 +0800 ticketing and questions working What commit is 53a9da3? Is it in any of your logs? -- 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/groups/opt_out.
Re: [git-users] Re: Merging from pull
On Dec 7, 2013 11:32 AM, Phillip Tutt phil.t...@gmail.com wrote: Yes it does. That commit is just prior to commencing work on the laptop. What Huu said about using git clone instead of git init/pull on the laptop sounds like it could have caused the issue. I will need to reset to the last commit on the laptop. So it's the parent of 4a09c3c? That's the first commit in the laptop log you showed us, but something doesn't add up. Git wouldn't make you do a merge between a commit and its own parent. What does the output of git log --graph --oneline look like? -- 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/groups/opt_out.