-1

I just started working with a group and we have a private repo set up, and I am having a hell of a time finding any good sources for working with it. Im not to great with git so I have some simple questions.

commands like

git add
git commit

do they run inside of the directory/folders that the repo is in.

git status
git pull
git push

do I have to specify the git repo like https://github.com/mager1794/mygitrepo.git

I used to use tortoiseSVN so I used GUI based subversion for a while, but I heard its considered a good career skill to get good using git bash.

Cody Jones
  • 424
  • 1
  • 5
  • 16
  • so when i right click and hit 'Git Bash Here' there i can just git add and git commit from there. But for push and pull I need to specify the repo? what about git status? do I have to specify the repo there as well – Cody Jones Nov 23 '14 at 03:17
  • 1
    Please start by reading a tutorial, or a manual like [git-scm](http://git-scm.com/book/en/v2/Git-Basics-Getting-a-Git-Repository). Then search for questions/answers that explain something specific if you don't understand something from the manual. If you still don't get it to work, ask your specific question. – Dennis van der Schagt Nov 23 '14 at 03:38
  • And yes, the git commands should be executed in the repo directory. For `push` and `pull` you probably want to add a [remote](http://git-scm.com/book/en/v2/Git-Basics-Working-with-Remotes) and use that as an alias for `https://github.com/mager1794/mygitrepo.git` – Dennis van der Schagt Nov 23 '14 at 03:41
  • 1
    from my personal suggestion. Do not use GUI, Use git from command line then you will come to know all hidden feature... – Raja Simon Nov 23 '14 at 05:47

1 Answers1

0

git add and git commit do run within any folder of your local git repo.
Please note the difference between git add and git add -A or git add -u.

git status operates only in a local repo, a non-bare one, meaning one with a working tree checked out. (See "concept of bare shared repository in git" on bare repos)

git pull and git push uses by default the remote named 'origin': see "Git Basics - Working with Remotes".
That avoids you to type the full url. See git remote.

To test those commands, follow the quick tutorial from GitHub.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250