Commands

From BOINC
Jump to: navigation, search

This is an page with examples for much used commands for Git, to be linked to https://boinc.berkeley.edu/trac/wiki/SourceCodeGit Because I have no rights to make pages in Trac Wiki, I'm making it here. Writing this page I lean heavily on the commands used at Siteground.com and some on Confluence.

We're not trying to teach a user how to use Git, but instead if they're ever stuck they can come to the page and quickly look down the page for the command they're missing.


git clone https://github.com/BOINC/boinc boinc
With this command you make a complete copy of the remote BOINC repository from the server onto your computer.

git fetch
With this command you get all the objects from the remote repository that are not present in the local one.

git pull
With this command you get all the changed files from the remote repository and merge them with your local one.

git branch boinc_7.8
With this command you make a branch called boinc_7.8 in your local repository.

git branch --set-upstream-to=origin/client_release/7/7.8
It may happen at times that you've cloned the BOINC repository and that it then only remembers the path to the remote repository's Master branch, which makes it impossible for you to update the boinc_7.8 branch with. With the above command you can quickly set the boinc_7.8 branch to the right remote repository. Git on your system will remember both paths after this.

git checkout boinc_7.8
With this command you can switch to the boinc_7.8 branch from the Master branch.

git checkout master
With this command you can switch to the Master branch from the boinc_7.8 branch.

git branch
Lists existing branches.

git branch -a
List existing branches, including the ones on the remote server.

git status
Shows you the status of files in the index versus the working directory.

git log
Shows a listing of commits on a branch including the corresponding details.

git log --since=01-12-1970 --pretty=format:"%s" --graph --grep="client:" --grep="MGR:" --grep="Mac:" --grep="Mac installer:" --grep="Mac uninstaller:" --grep="Manager:" --grep="client/lib:" --grep="LIB:" --grep="SCR:" --grep="WINBUILD:" --grep="locale:" --grep="CURL:" --grep="OpenSSL:" --grep="zlib:" --grep="Linux:" --grep="VBOX:" --grep="server:" > a_filename.txt
An example of a large search through all commits for specific key words.