![]() ![]() It's a command-line tool that exists alongside Git and is specific to GitHub (Git itself can interact with multiple services such as GitLab and BitBucket also). In hindsight if I would have just gone through and created a gitlab project and realized that the instructions were right there infront of me then I wouldn’t have had to look for how to do this Google.If you want to go a bit further with GitHub and start pushing your own files to it then I highly recommend also having the GitHub CLI application in your arsenal. After you enter your credentials, git will push the repository.Īt any time during this process you can check status by using the following command git status You may be prompted for your username and password. ![]() git commit -m "Initial Commit"įinally we can push our local repository to our remote repository. The -m command adds a note to describe what the commit was for. You would do this anytime you make any changes to any files. Next we need to commit all the changes to our local repository. You’ll want to do this anytime you add a new file git add. Now that we have the remote repository added we can add the contents of the directory to our local repository. Next we’ll need to add our remote repository, you do this by using the Project URL and Project slug you noted above which is also shown to you in the Push an existing folder section on Gitlab git remote add origin ![]() Once you’re in the folder that contains your project you’ll want to initialize your folder and create your local git repository, you do this by issuing the command below. There are tons of tutorials online about how to do that. You might want to add a README.md file before you start. So command window / terminal you’ll need to change to the directory containing your project. You’ll see here the section about Push an existing folder. ![]() The next page gives you some basic info on how to push a project. You’ll want to take note of your Project URL and Project slug, these will be important later. This would just add a little more complexity. If you check this box then you’ll need to PULL the repository down before you can add your project. Make sure that you leave the Initializations repository with a README unchecked. This process is pretty much the same on either the GitLab site or your self hosted server. To begin you’d need to create a project on GitLab. I use a Mac by the way but the process should be similar on any Linux distro and even windows as long as you have the Git client installed. This is mostly a post for me to use as reference because I recently found myself needing to push a project to my self hosted GitLab server but had completely forgotten how to do that from the command line. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |