- HubPages»
- Technology»
- Computers & Software»
- Computer Software
Using Gitlab projects on Github Desktop For private projects
Using Gits smartly
These two gits are the most popular gits repository present in current time. If you are looking for a project management of Software Development for your personal use then we can take advantage of the features available by these gits repos and gets your job done.
The advantage of using gits is for version controlling. If you are working in a project in your office workstation or in your college lab and then want to work on the same project from home or from your laptop so that you don’t have to be in the same workstation all the time then you can use the following procedure :
- Create an account in github and in gitlab. It will be easier if you create with two different account so that you can identify which account you are using.
- Download github Desktop app freely avaliabe from https://desktop.github.com/ , the additional git bash and git GUI for ease from here https://git-scm.com/downloads
- login to the github desktop using your github account
- Create a git directory by clicking + sign, then locate the path to the directory which you want to work on
- Add the files to the directory
- Create a private project in gitlab
- Go to setting of github desktop app by clicking the gear icon in the top right
- Copy the https part from gitlap project and paste it in the remote setting of the github desktop app
- Click ok
- Click compare
- If there are changes then it will show you
- If you want that in your gitlab main project then give some name and commit the changes( you cannot commit without giving name)
- Click publish/sync in the top right
- It will be in main project in the gitlap
To sync it to the another desktop/laptop
- download, install and login to the github desktop app
- Go to the folder where you want all the files from the main gitlab account
- Right click and open the git bash here
- Login to the gitlab account with following commands
git config --global user.name "Name in account"
git config --global user.email "Email in account"
Go the existing directory and type
Git init
git remote add origin https://gitlab.com/dusrob777/sdf.git
- open Github desktop app
- Locate the directory
- Remote login to the same gitlab account
- Click sync
All the folders and files from the gitlab project should be in your lapto/computer now
After this ,
You can work all day in one computer/laptop and at the end of the day,
You can go to the github desktop app and click the change, give a name to the commit, and click commit to master and click the sync
Next time before you start to work from another computer on the same project
Open the github desktop
Click sync and you will receive all the files ,
Work on it an at the end of the day, give commit a name and commit and sync it .