GIT

We are using GitLab for archiving our progress during the Fab Academy, and I chose to use Source Tree for managing my Git, still I did have to rely on the Git Bash for few minor tweaks.

For using GitLab it was necessary to create an SSH key, and for Source Tree there was a separate tool for this. You can access the tool under the tools menu, for "Create or Import SSH keys". When you create an SSH key with this tool, you can give the key a clear name in the "Key Comment" field. This name then shows in the GitLab page as the id for the key. You will want to save the key you made, as it will be needed later on.

The key is inserted into the GitLab in your user profile, it is also advisable to change your password for the site. Once you have been given access to the project, you can copy a link for it.

Kuva Vasemmalla - Zoom

You then clone the project to your computer using the Git. In source three this is done with the icon in top left corner, "Clone/New" and direct it to

git@git.fabacademy.org:fabacademy2017/fablaboulu.git

When using Git it is crucial always to first pull all the changes others have done, then commit all your own changes. you can check the link you used after the repo has been made through settings button in the top right corner.

Since gitlab uses SSH, the SSH key needs to be linked for the software. This is done in the program options.

It generally makes life easier to save the gitrepo and its ssh key in a cloud drive, like the google drive. This way you can update your documentation even on the go.

When using the Bash console, you would need to "git status" to query if there has been any changes. Then you would "git pull" to download all the changes others have made. Then you "git add" your own files, in Source Tree this is called staging. As you setup different repositories to be used in source tree, it automatically queries the status of the repo so usually just pulling is needed.

I initially had some problems with getting my first test page to work, and one of the reasons suspected was problems with file permissions. To fix these one needs to use the bash console.

git ls-tree HEAD

Command you can inspect the files and their permissions in the folder. Usually files have a 100644 permission, of this we can ignore the 100. For files to be more accessible, one needs to change the 644 to 755.

git update-index --chmod=+x filename

This command will give the file 755 permission. One now does need to remember that these changes wont show in the ls-tree command until the changes have been committed. you can see that there are changes to be committed with the git status command.

git commit -m "commit message"

You can now use this command to commit the change, once you have done that you can now use the git ls-tree HEAD command again to see that the file has been changed.

At this point it is best to close the bash console, and use the source tree to push the committed changes to the git.

Kuva Vasemmalla - Zoom

The paperwork

  • Assesment
    • Have you, made a website and described how you did it?
    • Have you, introduced yourself?
    • Have you, described and made a sketch of your final project?
    • Have you, documented steps for uploading files to archive?
    • Have you, pushed to the class archive?
  • Lecture Details
  • Lecture Video
  • Review Video

Sub-pages

GIT

I used Source Tree by Atlassian for managing my GIT

A general list of GIT commands