Print

Print


Wow, I think the mailer ate some of my line breaks.  o.O

I'll put up a Confluence page at some point covering this...

-----Original Message-----
From: [log in to unmask] [mailto:[log in to unmask]] On Behalf Of McCormick, Jeremy I.
Sent: Thursday, January 19, 2017 12:46 PM
To: Holly Vance
Cc: hps-software
Subject: RE: hps-java moving to git

Branching in git is generally much easier to manage than in SVN, and you basically have the following steps:

# checkout the master from within your local copy of the repo (equivalent to trunk in SVN) git checkout master

# make sure you are sync'd with the remote repo before you branch git pull

# make a local branch from the master
git checkout -b mybranch

# commit changes to your local branch -- this does not effect the remote repo until you 'git push'
git add some/file; git commit -m "adding some file" some/file

# create a remote copy of the branch to track and push to it git push -u origin mybranch

Now your local branch tracks the remote branch, called "origin/mybranch" in git terminology, so you can then subsequently 'git push' to it normally.

To checkout the branch locally, e.g. if you wanted to switch between local branches or the master, you would do:

git checkout mybranch

You can also 'git pull' to get changes that others push to the remote branch.

The command 'git stash' can be used to store local, uncommitted changes that would be clobbered by switching to another branch (you can get them back with 'git stash pop').

That's pretty much it.  

Merging back into master from a branch is a separate topic but pretty straighforward (we will generally handle that with pull requests which I'll go over later once the repo is setup).

-----Original Message-----
From: Holly Vance [mailto:[log in to unmask]]
Sent: Thursday, January 19, 2017 12:20 PM
To: McCormick, Jeremy I.
Cc: hps-software
Subject: Re: hps-java moving to git

Hi Jeremy,

I know we use the svn kit in eclipse for software. Is there something equivalent in git that we can use for eclipse?

Also, will you be updating the software pages in confluence on how to branch, pull, check status, etc? 

-Holly

On Thu, Jan 19, 2017 at 3:15 PM, McCormick, Jeremy I. <[log in to unmask]> wrote:


	Hi,
	
	The decision was made in the software meeting today (by a nearly unanimous vote) to move hps-java from its SLAC-hosted SVN repository to github under the JLAB organization.
	
	I am planning to start this migration early next week.
	
	Once we have imported hps-java into git, probably we should freeze updates to the SVN repository entirely (though there are ways to keep them in sync during the transition period).
	
	Most people developing in hps-java probably already have a github account, but if you do not, then you should sign up for one at http://github.com (it is free).
	
	Then you will want to request to be added to this github organization for write access to the repository, if you do not belong already:
	
	https://github.com/JeffersonLab <https://github.com/JeffersonLab> 
	
	If you have pending local updates to hps-java that are reasonable to commit to the SVN trunk, then I'd encourage you to do that today or tomorrow as probably Monday I am going to push my local git import of hps-java to the JeffersonLab/hps-java git repo.
	
	Please feel free to send any questions/comments you have to the hps-software mailing list.
	
	--Jeremy
	
	########################################################################
	Use REPLY-ALL to reply to list
	
	To unsubscribe from the HPS-SOFTWARE list, click the following link:
	https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=HPS-SOFTWARE&A=1 <https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=HPS-SOFTWARE&A=1> 
	



########################################################################
Use REPLY-ALL to reply to list

To unsubscribe from the HPS-SOFTWARE list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=HPS-SOFTWARE&A=1

########################################################################
Use REPLY-ALL to reply to list

To unsubscribe from the HPS-SOFTWARE list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=HPS-SOFTWARE&A=1