LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-19-2014, 09:16 AM   #1
yooden
Member
 
Registered: Dec 2013
Distribution: Debian Wheezy/Jessie # XFCE
Posts: 53

Rep: Reputation: Disabled
Git: Selective Push


I'm starting to use Git (after a couple of years of CVS, then SVN). One thing I can't figure out:

I'm obsessive (lokal) commiter, eg. during a 60-minute session on a train I commited seven times. I don't want to push my changes upstream in that granularity though. Instead, I would like to push all changes from a particular lokal branch since my last push from that branch as a single diff.

I fiddled around with rebase, but couldn't figure out a way to make it compliant. I want to avoid anything that would leave Git, ie. diff/patch.

Any pointers?
 
Old 03-19-2014, 10:40 AM   #2
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,223

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
You have to merge the commits. And yes, git rebase is the way to do it.

http://gitready.com/advanced/2009/02...th-rebase.html
 
Old 03-19-2014, 12:10 PM   #3
yooden
Member
 
Registered: Dec 2013
Distribution: Debian Wheezy/Jessie # XFCE
Posts: 53

Original Poster
Rep: Reputation: Disabled
Thanks for the link, I have another look.
 
Old 03-20-2014, 03:27 PM   #4
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940
Although, also an "obsessive committer," I usually don't do that. All of the work is done in a single branch, so "that's the container for the entire set of changes." After having a few messy problems with rebase, I just stopped doing it.

But I also, these days, probably commit a little less than I used to. Instead, I rigged up a desktop icon (and an Eclipse shortcut) that does an "rsync" to another directory on my hard drive. I hit that button very frequently. (Plus, Time Machine is going off on my Mac every hour, and sometimes I trigger backups more often.) This is my first line of defense against
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
git: shorter way to deal with commits you don't want to push? stateless Programming 6 10-31-2013 05:23 PM
Cannot pull or push to Git repository as normal user abrinister Linux - Networking 12 10-26-2012 02:47 AM
[SOLVED] publickey fails, denied access to git push Siljrath Linux - Networking 1 02-10-2012 03:50 AM
[SOLVED] git push in a git-init without --bare option? xeon123 Linux - Newbie 1 06-27-2011 03:44 AM
git push origin doesn't update the remote repository immediately mohtasham1983 Linux - Server 1 07-15-2009 01:07 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration