-
Notifications
You must be signed in to change notification settings - Fork 2k
Git cheatsheet
BytesGalore edited this page Nov 21, 2014
·
8 revisions
git clone git://github.com/RIOT-OS/RIOT.git
If you require write access, please contact the RIOT-team via email.
You may additionally want to checkout the platform configuration and initialization code from
git clone git://github.com/RIOT-OS/boards.git
or
git clone git://github.com/RIOT-OS/thirdparty_boards.git
Exemplary projects can be found in the projects repository:
git clone git://github.com/RIOT-OS/projects.git
Edit the file @.git/config@ within your local repository and replace
url = git://github.com/RIOT-OS/RIOT.git
by
url = git@github.com:RIOT-OS/RIOT.git
Example for the stable branch:
git branch --track stable origin/stable
- (Examples are for release 0.01a)
git tag -s 0.01a
git archive --format=tar --prefix=riot-0.01a/ 0.01a | gzip > riot-0.01a.tar.gz
To have a colored output for all git projects execute:
git config --global color.ui auto
If you only want a colored output for your current git project, then omit the --global
attribute.
This also shows whitespace errors in red.
To rebase your master, local and remote, on the current RIOT master:
- switch to your master branch, i.e.
git checkout master
- apply
git pull --rebase https://github.com/RIOT-OS/RIOT.git
, to receive all changes from the RIOT master - and finally push your local rebased master to your repository, i.e. just
git push
To rebase your specific branch, local and remote:
- rebase your master, as described above
- switch to the branch you want to perform a rebase, e.g.
git checkout my_cool_branch
- apply
git rebase master
- solve appearing conflicts if happen
- and if everything is done apply
git push -f
to update your repository with the rebased branch
note: if not using the-f
(force) option, git will complain your local branch diverges with your remote branch, and suggests you to first pull the changes (which usually would be not what you want)