Skip to content Skip to sidebar Skip to footer

how do i upload unity game to github

Start, you need to create an account on GitHub at GitHub. It's completely free, piece of cake and is the showtime step to creating an online portal to host your Unity projects.

So you need to Download git at Git. Depending on what operating arrangement y'all are using will make up one's mind what version you download.

After downloading git you so want to install it; I placed it on my desktop.

You and so want to create a repository in your GitHub account. It'due south on the top left of your screen; you want to click on new.

Give the Repository a proper name; I named it subsequently my Unity project. Give it a description, go on it public, click on Add .gitignore select <unity>, and then create the repository.

This part is important. Y'all want to click on lawmaking and and so re-create the Url considering this is how you will gear up this repository to communicate with your reckoner and upload your files after on.

Y'all too want to change your branch proper noun in the middle left to main to be able to follow along with this guide.

Side by side, we want to prepare our git awarding to have the correct directory.

The command ls <enter> will give yous a list of what directories are bachelor, and this is where y'all want to change its directory to where you are keeping your unity projects.

$ cd "desktop" — makes the directory go to desktop

$ cd "unity projects" — makes the directory become the unity projects folder located in my desktop.

$ cd "infinite shooter pro" — makes my directory go the binder I'k keeping my Unity project located.

Yous and so want to initialize the repository with your directory past typing in

$ git init

Now you need to use that code URL from Github nosotros copied before to add it to our git desktop server.

Type:

$ git remote add together origin <paste in the url>

You have now added your repository server and the 2 will now be able to communicate.

To verify that it has worked y'all tin type in

$ git remote -v

and you should see

This also tells you that you at present have permission to fetch and push to the origin which is must! :)

(if you lot e'er want to see commands in general that are available yous can type

$ -- help)

Now, this part is very very important!

YOU MUST DO THIS IN THIS ORDER for it to work properly:

  1. Pull
  2. Commit
  3. Push

Once again for prosperity

  1. Pull
  2. Commit
  3. Push

You have to do these steps in this order for your files to upload correctly!

First let's go ahead and pull.

$ git pull origin <branch proper name> in this case our branch proper noun should be master because that'south what we named information technology.

$ git pull origin chief

At present you tin type:

$ git condition

This will pull up and show yous all of the files you have on your desktop that take not been uploaded to your repository; what's nice is they are listed in cherry.

To add the files to the repository you lot want to type:

$ git add .

This will add all of the files and if you type in git status again information technology volition evidence the files as green. This is likewise the command you want to employ to add any changes you accept fabricated to your Unity project before you lot push button your files back onto the server.

So at present this parts is fun considering if this is your start time using this application, you volition not be able to practise step 2 yet (commit).

I really got stuck on this and had to figure it out by playing around for a bit but luckily y'all but become to know the fix without the play lol.

You cannot commit or push button until you tell git who you are. Let's tell the application who is doing the committing and pushing by typing

$ git config user.e-mail "your email"

Now it gets even more fun!

Github will launch another browser and inquire y'all to verify that information technology's y'all.

You desire to sign in to your account and so it volition give you an authentication code so you will follow the link and put the code into yet another browser. That's it though and you have finished; assuasive yous to commit and push <yay>.

Now allow's exercise step 2 <commit> get alee and blazon

$ git commit -thousand "(any you're doing)"

Now we can practise stride 3 and finish up by pushing all of the changes we take made to our files back onto the server by typing

$ git push button origin main

At present if you refresh your GitHub repository you will see that all of your files take been uploaded.

basically, at this bespeak, it'southward just a rinse and repeat method!

ONCE AGAIN

  1. Pull
  2. Commit
  3. Push

!!!!!!!!!!!!!!!!!!!!!!! don't forget that

CONGRATULATIONS ON CREATING YOUR REPOSITORY

have fun coding ;)

stewartviode1982.blogspot.com

Source: https://blog.devgenius.io/creating-a-github-repository-ba27c298d7ad

Post a Comment for "how do i upload unity game to github"