We created a test repository to let you check your installation and make your first steps.
To get the code you need to clone a remote repository:
git clone email@example.com:hampel-soft/open-source/hampelsoft-test.git
Beware: SSH clients use the
known_hosts file to authenticate the server, to check that it isn't connecting to an impersonator. The first time you connect to a new server, you have to acknowledge the authenticity of the server by accepting the ECDSA key fingerprint. Some GUI clients hide the appropriate message, so if you get permission errors, try cloning from the command line.
If you already cloned a repo, you can pull updates from the remote repository into your local clone:
This will fetch changes from a remote repository and integrate the changes into the current branch.
If you only want to download the changes from the remote repository, but not (yet) update the actual files on your local repo, you can fetch:
If you want to update (pull into) a branch other than your local head, you can. For example, you can pull changes from
develop while working in another branch by using this command:
git fetch origin develop:develop
A submodule is a repository embedded inside another repository. We provide a detailed description and other resources on our Best Practices page on git submodules.
hampelsoft-test repository contains the
hampelsoft-test-sub repo as a submodule. After cloning the repository, the submodule directory is empty (as it is uninitialized). The following command pulls the contents of the submodule repository into the local submodule folder:
cd hampelsoft-test git submodule update --init --remote --recursive
To propose files for version controlling (to make git work with your files) you need to stage the files:
git add README.txt
To actually add new or changed files to the repository, you need to commit them:
git commit -m "first commit"
To send your changes to the central, remote repository, you need to push your local repository:
git push -u origin master