Updating a File in GitLab

I am not used to GitLab and I have noticed a few differences between using git and using github.

I am simply trying to update a file. In the past, in using version control systems, I would first check out the file, update (or merge the code) and then upload the file to the version control system.

I do not see any options in gitlab to do these steps.

I tried a quick search online and I found only ways of doing this with an IDE like visual studio. Well, my situation is a bit unique. I had to test and change the original files in Android Studio on a seperate computer. And now I am ready to change the files in GitLab.

Updating a file is more or less the same in GitLab as it was when we had a Git server before.

  1. a. Find the project containing the file, and clone it to your computer (i.e. git clone <project>)
    b. Update your local clone of the project (i.e. git pull)
  2. Edit the file on your computer
  3. git add <file> on your computer
  4. git commit, and enter a commit message in the editor that opens
  5. Push the file to git (ie. git push)
    (nothing GitLab specific in that)

If your local development methodology dictates working on forks or branches (that makes sense) add the following to the list:

  1. Make a MR from the fork/branch you’ve been working on the the main branch of the project. (in the GitLab web UI)
  2. Get someone to approve the MR (the number of approvals depends on your local policy)
  3. Merge the approved MR (in the GitLab web UI)