- What is Git?
- What are ‘branches’?
- Getting Started
Hopefully you are familiar with Git terminology or have read my guide, What is Git?, as I will be explaining here how to Clone, Stage / Commit / Push and Pull in GitKraken.
Hopefully you are already set-up with SSH in GitKraken, if not you can follow my guide, Getting Started with GitKraken for Windows.
I’ll be looking at the basics that you need no matter which Git client you’re working with, to explain how this terminology is put to use in GitKraken:
Copy your repository from the remote repository.
- Stage, Commit and push
Send your work from your local repository to the remote repository.
If your local repository is out of date due to changes pushed to the remote from somewhere else, grab those changes and merge them in to your local. This is mainly used if you’ve personally been working from several different computers, or if you’re working with team members who have been pushing to the same branch. Always remember to pull before you start working for the day.
- As with all Git projects, the first thing we need to do is Clone our project on to our computer. Copy your SSH address from GitLab:
- In GitKraken, browse to File > Clone Repo. Fill out the fields as required:
- Where to clone to: Select the folder that holds all of your Git projects, for me this is D:\dev.
- URL: This is the address you just copied from GitLab.
Hit the ‘Clone the repo!‘ button when ready to clone. All done, you’ll see a progress bar, and when that’s completed, you’ll be able to see your entire history of commits. Note that for new projects, this will be quite empty.
Stage, Commit and push
Remember that you can see all of your commits in your main project screen (see the above image). Keep an eye out for a certain commit that appears at the very top, it’s a special commit called “WIP” and will ONLY appear when you have made changes to files in your project.
When you select this commit, your file viewer on the right-hand side becomes a commit dialogue. It will show you un-staged files that need to be moved into staging. This commit viewer also includes a field where you must input a commit message, and a commit button for when you’re ready to execute your commit.
- Stage your files.
- Add a Message.
- Hit the green Commit button down the bottom.
- If your commit is successful, you can hit the ‘Push‘ button at the top of your GitKraken window:
Now your data is all backed up on GitLab, safe and secure, you should notice your new commit appearing in the history log.
Here is the entire process again in a single image:
This part is nice and easy. It’s the down-facing arrow button right-next to your Push button. It’s a good idea to hit this button before you start your work, just to make sure you have the latest data on your machine. You don’t want to be working on old / outdated files. If you’re working between home and work, you’ll use this button a lot if say you go to work and need to pull your data from home.
That is pretty much all you need to know for working with GitKraken. As usual, contact me if you need more info.