As you can see, the project is managed by git, a revision control system used by some open source project.
I'm new to git so I download the source code by following the command, everything is fine. But then when I browse the source code, I found that my local repository doesn't have certain files and directories which exist when I browse them online from here: http://linux-zigbee.git.sourceforge.net/git/gitweb.cgi?p=linux-zigbee/kernel;a=tree;h=d6fac23360241750fcae3d9e2f1012af79934c48;hb=d6fac23360241750fcae3d9e2f1012af79934c48
After a little digging out I realize what's checked out in my local directory is the master branch while the one has more files and directories is devel branch. Some commands can be used to catch up the latest updates from the devel branch:
$git branch -r --->shows all the remote branches git is tracking
origin/HEAD -> origin/master
origin/devel
origin/devel-wpan-phy
origin/master
You can see there are three branches with the HEAD pointed to origin/master.
$git branch --->shows existing branches, with the current branch highlighted with an asterisk.
master
* origin/devel
I have 2 branched with origin/devel as the current one. (I have switched to origin/devel already, otherwise the asterisk will be with master)
$git checkout -b origin/devel --->switch to origin/devel branch, and bring in all the latest code from devel.
With the last command my current branch is switched from master to devel. And I have all the latest updates from devel in my local directory, such as macieee802154, drivers for atmel tranceiver, cc2420, etc.
From here, the following commands can be used to synchronize local repository with remote:
$git pull
or
$git fetch
No comments:
Post a Comment