[OT] Question about Git branches

Albert-Jan Roskam fomcl at yahoo.com
Tue Sep 16 10:00:50 CEST 2014


-----------------------------
On Tue, Sep 16, 2014 9:37 AM CEST Steven D'Aprano wrote:

>Ben Finney wrote:
>
>> "Frank Millman" <frank at chagford.com> writes:
>> 
>> I know there some Git experts on this list, so I hope you don't mind
>> me posting this question here.
>> 
>> I do. There may be experts on parquetry flooring in this forum, but a
>> topic is not on-topic merely because some people here may know about it.
>
>(1) Frank labelled the post [OT] so that people not interested in off-topic
>posts can filter it.
>
>(2) Parquetry flooring has nothing to do with Python programming, while
>source control is very relevant. Asking questions about revision control is
>at least as on-topic as asking what editor one should use for Python
>programming, a question I note you have been known to respond to :-)
>
>In my opinion, objecting to Frank's question is not as friendly or helpful a
>response as I believe we should aim to provide. A more friendly response
>would have been to suggest that he would likely get better quality answers
>by elsewhere, but without the editorialising. It's your right to have a
>different opinion, of course, and you can continue to agitate for a
>stricter application of on-topic questions, but I just wanted to say I
>don't fully agree with your position in this matter.
>
>Frank, I am not a git expert, and I don't have an answer for your question,
>sorry. Ben's advice to ask it elsewhere is sound.
list

I entirely agree with Steven. VCS is about good software craftmenship. It is just as on-topic as PEP8 is. Vcs is for code what toothpaste is for teeth. Witout it you get bad breath and code smell :-)

Wrt the question: I think you should commit or stash files before switching branches. Also 'add' files to make them known to Git. I always use 'commit -a -m' to automatically stage all changed files. In short your working copy should be clean before switching branches.





More information about the Python-list mailing list