lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] Get DEVEL-1_4_1 branch with git


From: Dmitry Potapov
Subject: Re: [lwip-users] Get DEVEL-1_4_1 branch with git
Date: Mon, 20 Feb 2012 19:55:00 +0300

Hi Mason,

> I've never used git. I haven't yet figured out how to check out
> branches, such as the DEVEL-1_4_1 branch. What is the command?

Git is a Distributed Version Control System, and as other DVCS,
it separates the work with a remote repository (fetching and
pushing your changes to it) and making changes locally.

So if you use Git, the first step is to make a whole copy a
remote repository. This is done using "git clone <URL>", in
case of LWIP:

git clone git://git.sv.gnu.org/lwip.git

After that you can checkout any remote branch to make changes
to it locally. For example

git checkout -t origin/DEVEL-1_4_1

will create DEVEL-1_4_1 branch, which will be set up to track
DEVEL-1_4_1 in the original repository. After that you can
make changes on it, but all changes stay locally until you
push them. (NOTE: The "git://" protocol is used only for
anonymous access to a remote repository, so you cannot use
it to push your changes).

If you do not plain to make any changes, but just want to use
the current DEVEL-1_4_1 branch to make a build, you can do:

git checkout origin/DEVEL-1_4_1

In this case, you will have the same working tree, but your
working will be detached from any branch. (This condition is
lovely described as "detached HEAD" in git lingvo). If you
have changed your mind and now want to make some changes then
you can do it easily:

git checkout -b DEVEL-1_4_1

(That creates DEVEL-1_4_1 branch and associate it with the
current HEAD). In git, branches can be created and deleted at
any moment as you wish. They are just references to some nodes
in the history tree (extremely lightweight).

Working using the command line may not be the best option,
especially for beginners. Git comes with "gitk" (git history
viewer) and "git gui" (GUI front-end to make modifications),
but they are many other alternatives, which may be easier for
beginners when you do not have to work with such as "bushy"
tree as the Linux kernel.

Personally, when I started to use Git a few years ago, I used
"qgit". Now, I use "gitk" to inspect history, and the command
line to commit. Though, there are many other good alternatives.


Dmitry



reply via email to

[Prev in Thread] Current Thread [Next in Thread]