Main steps
(If it is not done already) install git client and meld comparison tools on your computer by entering commands:
Install meld diff tool:
Set user data for Git version metadata with commands:
Set default editor for commit notes etc. in git with command, e.g.:
Set meld as default merge and diff tool for git:
Connect with SSH to the bcserver
where uXX is your StudentId
(and bcerver is shorthand name created in /etc/hosts file for tools.odo.lv)
Accept server key fingerprint:
type yes
Enter your initial password for the user:
type your password and press Enter
Change password for your user, by entering command on bcserver:
and enter required input:
Current password: New password: Retype new password: | initial password given to you by teacher |
Create remote Git repository:
Go to your project:
Initialize local Git repository for the project:
Add remote repository to the project:
or, if you want to change settings, open .git/config file in the project and change settings:
Create .gitignore file in your project folder with following content:
Run GitTest1 unit test in package jtm.activity031 and check results.
All changes can be commited to local repository and pushed to remote repository using following commands1:
Add all changes to your local repository and push them to remote repository:
If you have local git repository with different history than remote project, and know, that local project is OK, then you can forcefully push your project to the server by adding -f switch, e.g.:
To ensure that all your history from local repository is pushed to remote repository, run command:
and chek that it returns lines:
If you have connection timeout:
Clone project from server
where JTM is code of your current project, and JTM1 is different name of your newly cloned project.
If you are tired of writing password for each push, you can enable SSH key exchange by following these instructions: