Re: [git-users] Can I fix this problem with branch renaming?

2012-03-22 Thread radovan bast

hi Charles,

is this a branch that is local and only visible to you?
if yes i would do the following:

1) delete the fix-up branch:
($ git checkout master)
$ git branch -d fix-up

2) create a new fix-up branch from HEAD on master:
($ git checkout master)
$ git branch fix-up

at this stage both master and fix-up point to the same commit.
fix-up is where it should be, master is too far. you are sitting
on master (HEAD points to master).

3) rewind master back to where you wanted to be:
$ git reset --hard hash

master now points to hash whereas fix-up is few commits ahead.

obviously i wouldn't do this if you have already pushed the commits
to some remote master.

good luck!
  radovan



On Thu, 22 Mar 2012 01:54:23 +0100, Charles Manning  
mannin...@actrix.gen.nz wrote:



Hi All

I screwed up by making a working branch but not switching to it.

ie something like

git branch fix-up
edit edit
git commit
edit edit
git commit

Now I have a few  commits on master that I really wanted on fix-up and  
fix-up

is where I wanted master to be.

I think I can fix this by using something like
git reset --soft HEAD^^
git checkout fix-up
git commit ...


But can I fix this by flipping the names around as follows?

git branch -m master tmp
git branch -m fix-up master
git branch -m tmp fix-up

Thanks

Charles


--
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] Can I fix this problem with branch renaming?

2012-03-22 Thread radovan bast

Interesting post, but this puzzles me:

On Thursday, March 22, 2012 8:52:12 AM UTC+1, radovan bast wrote:


obviously i wouldn't do this if you have already pushed the commits



I guess it is a problem if some other people commit on the wrong master
branch?


that's right. if commits moved the wrong branch and this branch is public
(somebody committed to wrong branch and pushed the commits),
perhaps in the central repository, then branch pointers should not be  
moved

back by rebasing. this is a general recommendation.

if that happened then i would git revert the commits.

there are other ways out but i think they would involve informing other  
people

where the new master is. i am curious to see whether they are better ways
to solve commits to wrong public branches.

best wishes,
  radovan

--
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] SVN vs GIT

2012-03-07 Thread radovan bast

- you get backup for free
- don't need the network for most operations (you can do work while on  
transatlantic flight)

- most important for us: possibility to commit locally, checkpointing,
possibility to checkpoint broken code, code review
- with git i am simply more productive

radovan




On Thu, 08 Mar 2012 05:53:12 +0100, Michael P. Soulier  
msoul...@digitaltorque.ca wrote:



On 07/03/12 Andrew Gray said:


The pushback I am getting is:
1. What does GIT give me that I don't get with SVN


- distributed instead of centralized
- branches that you can actually merge again
- commands that don't involve ridiculously long urls for simple  
operations

- easier forensics when trying to figure out where lost patches went
- high performance
- it just sucks a lot less

2. It is just another thing I have to learn and why should I when I  
don't

know what benefit I get.


losers. Since when is learning not justification in and of itself?

Mike


--
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 add and untracked file

2012-01-10 Thread radovan bast

hi,
this should help:
http://stackoverflow.com/questions/572549/difference-of-git-add-a-and-git-add
good luck!
  radovan

On Tue, 10 Jan 2012 20:54:31 +0100, Kevin Wilson wkev...@gmail.com wrote:


Hello,
My aim is to add to a git tree changes in modified files and to create
a patch. I do **not**
want that the patch will contain  untracked files.
When I try git add -A, it adds  also the untracked files, and later,
after git commit -m blablabla and
git format -n1, I see the  untracked files in the patch.

I know that I can add the name  for each untracked file in .gitignore;
in this way , the patch will not include
the untracked files; but I need a way to achieve this without adding
to .gitignore each untracked files.

So - is there a way to perform git add only on modifed files (and not
by adding each modified  file separatel by git add) ? is there a way
to list of modified files only (to use it later)?
rgs,
Kevin


--
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] managing only-local changes

2011-11-20 Thread radovan bast

is it a repo that you only use or a repo where you contribute to?

if you only receive (git pull) but never contribute (git push),
then i would commit your changes locally. then subsequent updates will be  
merged with
your local change until somebody else modifies and git pushes the path,  
which brings me to the second

part:

if you also contribute to the repo then i would change your Makefile:
separate it into a generic part and a specific part (Makefile.config,  
included in Makefile).
it would then make sense to take Makefile.config outside of version  
control.
typically configure generates Makefile.config. since it is different on  
each machine

it does not make sense to track it in the origin repo.

good luck!


On Sun, 20 Nov 2011 18:55:02 +0100, Rustom Mody rustompm...@gmail.com  
wrote:



When I am working with a certain git repo I need to make a 1 line
change to the Makefile (for adapting to my paths)

So then whenever I do git pull I get

error: Your local changes to the following files would be overwritten by  
merge:

Makefile
Please, commit your changes or stash them before you can merge.

What is the normal approach to solving this?


--
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] Could you please tell me how to fetch a single file?

2011-11-01 Thread radovan bast

$ git checkout file

there is very good git documentation out there.

radovan


On Tue, 01 Nov 2011 19:44:18 +0100, Rambo demia...@gmail.com wrote:


Git documentation is useless, I don't know how to do the same as svn
update file with git. No one mentions it and I'm desperate because I
fucked up something in production and don't know how to fix it.
Thanks.


--
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] Could you please tell me how to fetch a single file?

2011-11-01 Thread radovan bast
i agree with David - i find it a bit unfair to say that Git documentation  
is useless.

as i said there is excellent documentation out there written by people
in their free time.
of course i understand that not everybody can invest time in Git details
but i also think that you don't need many commands to survive
with everyday Git situations - i bet you can live a fulfilled Git life
with 10 commands.
it is possible that there may not be many ultracompact Git tutorials.
but only we can change that: the community.
  r.



On Tue, 01 Nov 2011 20:13:13 +0100, David Aguilar dav...@gmail.com wrote:


On Nov 1, 2011, at 12:04 PM, Phlip phlip2...@gmail.com wrote:


Git documentation is useless


+1.

Someone needs to assume that some people here don't want to work
full-time with git, and learn all its tiny details just to get
anything done. I'm aware of the various tutorials and cheat-sheets out
there, but there's just nothing that sketches every path between two
points. And gods help you if you want to revert some kind of complex
multi-branch merge. I always just git clone the revision I need into a
scratch folder, then copy all the source over. Sheesh...


what are you doing to improve the situation?

what documentation, specifically? git-scm.com has good links and
progit is quite comprehensive. are there points that can be improved?
helpful criticism helps to improve the situation instead of
complaining into the abyss.





please help the community help you.


--
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] Could you please tell me how to fetch a single file?

2011-11-01 Thread radovan bast

let's say you want it from origin/master:

$ git checkout origin/master file

and you are welcome,
  radovan


On Tue, 01 Nov 2011 20:24:31 +0100, Rambo demia...@gmail.com wrote:


git checkout file reverts the file... I need to UPDATE the file from a
remote repository. i don't get why everyone I ask tells me the same, it
does not work for me.
Documentation says git checkout works for branches, it does NOTHING about
pulling file updates...


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