Search Unity

Help needed with gitbash commands

Discussion in 'Editor & General Support' started by Deleted User, Oct 20, 2019.

  1. Deleted User

    Deleted User

    Guest

    I've spent some time checking the internet for proper step by step commands and I can't find any. I checked this forum and found an outdated link - https://forum.unity.com/threads/git-github-source-conrtol.553864/. I'm following a free tutorial from Udemy and it's not totally comprehensive. From what i understand, there are a few steps to use git bash. So far, I only got 2 steps and it's still not complete. What are the minimum steps required to get my project in C drive to be inserted to git - as in https://github.com/login? I already know how to start git bash from Windows explorer.

    1 - git init - This will take at least 1 min to process.
    2 - git commit -m "<comment">. (I didn't realize the comment is compulsory to make the command work).
     
  2. Olmi

    Olmi

    Joined:
    Nov 29, 2012
    Posts:
    1,553
    If you want to get your repository to GitHub from command line, here's the official info:
    https://help.github.com/en/articles/adding-an-existing-project-to-github-using-the-command-line

    Steps are very clear so it should work fine.

    And when you try out that process first time, just make dummy repository with one file like test.txt, so you don't waste your precious time with waiting. You can delete your test repository at GitHub when you've tried it out successfully.

    P.S. Git and GitHub are two different things. Git is that version control app on your system, GitHub is that web service that hosts repos.
     
  3. Deleted User

    Deleted User

    Guest

    ok thank you. I succeeded doing so but I got some error message. I got the steps from within github itself so now it looks good. However, I need help. See what is below - I don't remember inserting anything private like e-mail addresses. Is this a system error or i need to remove something in my file?

    $ git push -u origin master
    Enumerating objects: 4596, done.
    Counting objects: 100% (4596/4596), done.
    Delta compression using up to 4 threads
    Compressing objects: 100% (4578/4578), done.
    Writing objects: 100% (4596/4596), 34.06 MiB | 3.63 MiB/s, done.
    Total 4596 (delta 3153), reused 0 (delta 0)
    remote: Resolving deltas: 100% (3153/3153), done.
    remote: error: GH007: Your push would publish a private email address.
    remote: You can make your email public or disable this protection by visiting:
    remote: http://github.com/settings/emails
    To https://github.com/JulianHSC/Ninja-test.git
    ! [remote rejected] master -> master (push declined due to email privacy restrictions)
    error: failed to push some refs to 'https://github.com/JulianHSC/Ninja-test.git'
     
  4. Olmi

    Olmi

    Joined:
    Nov 29, 2012
    Posts:
    1,553
  5. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,438
  6. Deleted User

    Deleted User

    Guest