SourceTree gives you access to the command line, I suggest you to start with the command line, once those basics commands known, that will then become easy to do it in sourceTree, in more, I can't teach you how to do that with sourceTree unless I do a screencast.

-Fred

-----Message d'origine----- From: Harbs
Sent: Friday, April 05, 2013 12:02 PM
To: dev@flex.apache.org
Subject: Re: Still confused by git

Thanks. I'll have to figure out how to translate that into the GUI of SourceTree. I'm not sure if I have the time today to play around with this. I'll probably get to it on Sunday…

How do I know which branch the working copy is using and how do I switch? I started looking at tutorials, but this stuff is really not intuitive to me… :-( I'm just hoping I'll be glad I learned git when this is all over… ;-)

Harbs

On Apr 5, 2013, at 12:33 PM, Frédéric THOMAS wrote:

oops, reverse the 2 furst steps:


-If you have some modified files in your working tree, save them first: git stash -u "my current work"
-Checkout the develop branch: git co develop

-Fred

-----Message d'origine----- From: Frédéric THOMAS
Sent: Friday, April 05, 2013 11:31 AM
To: dev@flex.apache.org
Subject: Re: Still confused by git

You right Harbs, that currently looks something I dislike at the point I
won't work anymore on that tree.

Well, for your case (I assume you updated your .gitconfig as shown in the
Wiki) :
-If you have some modified files in your working tree, save them first: git
stash -u "my current work"
-Be sure the branch is up to date before to start working on it: git
pull --rebase
-create the branch you will work on, assuming your create a JIRA first: git
co -b "FLEX-XXXX"
-get back the work you save on this branch: git stash pop
-Edit/add files/dirs
-Add them to the staged area(also called index) and commit, you've got 2
choices, either you do 1 commit or more:
1- To add all of them in a once, that's in order to do only one commit:
      - git add .
      - git ci -m "FLEX-XXXX: Fixed this"
2- To add them one by one, that's in order to make more commits
      - git add <myFile1> <myFile2>
      - git ci -m "FLEX-XXXX: Fixed this in my 1rst commit"
      - git add <myFile3> <myFile4>
      - git ci -m "FLEX-XXXX: Fixed this in my 2nd commit"
- check all the files are committed: git st
- If there are more repeat the add/commit steps, otherwise, go back on the
develop branch: git co develop
- rebase your work on what the others did: git pull --rebase
- Merge your branch to the develop one: git merge --no-ff  FLEX-XXXX
- you can now push: git push
- you can remove your local branch if you want now it is unused: git br -d
FLEX-XXXX


I hope that helps

-Fred

-----Message d'origine----- From: Harbs
Sent: Friday, April 05, 2013 11:06 AM
To: dev@flex.apache.org
Subject: Re: Still confused by git

Hi Fred,

I've read those pages. (I see now you've updated them.) Conceptually, I sort
of got the idea of how to do things, but I find that until I actually do
something once, I don't quite "get" it… If someone could walk me through
this once, I think I'l be a lot more comfortable that I'm doing things
right.

There's also been a lot of discussion on when to rebase and when not. I'm
not clear on whether there has been a consensus on that. Looking at the
graph, it seems to me that not everyone is working exactly the same way.
(unless I don't know how to read the graph, which is also possible…)


On Apr 5, 2013, at 11:29 AM, Frédéric THOMAS wrote:

Hi Harbs,

Check the wiki first for a complete workflow guideline and git setup, if you need more info, ask them after you reviewed this wiki pages [1] [2], there are even interactive tutorials really well done. [1] [2]

I advice that to everybody, for myself, until everyone understood and applied the basics written in the wiki, I won't touch the SDK anymore.

-Fred

[1] https://cwiki.apache.org/confluence/display/FLEX/Git+for+Apache+Flex+Guide [2] https://cwiki.apache.org/confluence/display/FLEX/Good+vs+Bad+Git+usage



-----Message d'origine----- From: Harbs
Sent: Friday, April 05, 2013 10:14 AM
To: dev@flex.apache.org
Subject: Still confused by git

I've tried to follow all the git discussions. But, after all the discussions on how to use git, I'm still confused on the basics.

Here's what I need to know right now:
Right now I have a number of files I've edited outside my working directory related to ColorPicker inside experimental. I'd like to commit this work to the develop branch. It probably makes sense to create a branch to indicate the work I'm doing on this. (or not?)

I'm using SourceTree on Mac. I'd rather not mess with the command line.

So far I've checked out develop and master. The index view shows a bunch of modified and deleted files. I have not yet touched any of the git folders on my machine.

How do I?
1) Make sure my working copy is up to date?
2) Make sure my working coy is the correct branch? (Does that make sense?)
3) Create a new branch? (Or do I?)
4) Get my changes up to origin?

I've seen a lot of talk about switching between branches, but this stuff is all very fuzzy to me and kind of scary… ;-)

Harbs


Reply via email to