Sometimes we got confused about how git works on our local and how it can be push to our remote repository…
Then now i have some simple step to push your git in local into the git remote like github or gitlab. On this article, i will show you the way push your github progress everyday with docker. I using Ubuntu 22.04.3 LTS, it’s a Windows Subsystem for Linux (WSL).
- Open your ubuntu 22.04.3 LTS, i think download from microsoft store is not a bad idea. Just open on it then it will show you the terminal.
- Now you can type “ls” for see your docker directory, “ls” meaning list, then you can type “cd foldername”, “cd” mean change directory, so it will direct into your project folder.
- After that, you can “ls” again, then you can dive into apps in docker with “cd apps”. Then, you must “ls” again for see your repository name. After it you can “cd” again into your repository name with “cd repositoryname”.
- Now you can “ls” for check the folder, if it already on your project, now we begin with push our progress on github project.
- Type “git branch” for ensure you are in right branch.
- Then type “git status” for check your modified file or progress that you already make on the day.
- After it, if you already sure about the progress that you check before, type “git add .” for prepare to push. I can imagine that like we are on boarding pass check when on “git status”, then we are just in waiting room for flight when we type “git add.”.
- Now you can type “git commit -m “your message””, this is a final step thats like when you are on waiting room then your flight number is call out and you got some last check while you go to the plane. Just fyi, “-m” meaning message, so you can custom the message in ” “, i recommend you to fill the ” ” with some messages that representate your progress in a day like “git commit -m “progress 16-03-2024 -Adding like button on view posts”.
- Then the final step is deng deng deng deng, yap you can type “git push origin branchname”, so if your branch name is development, you can type “git push origin development”.
- After it you are asked to github or gitlab username and password, just type your username and password correctly, and tadaaaa, now your progress already push from local git repository into remote git repository. Congratulations mate.