Questions git & github

Asked

Viewed 140 times

0

I started using git recently for versioning and, like any self-respecting newbie, I’m still hooked on some features. Every time I commit a project and take it to the Github repository, the previous project always goes with it. And I don’t know why, because when I use "git status", only my files that I want to bring to the repository are committed.

Imagem

The "Clinicall" project, which is the intruder, is weird because the timer says he’s been there a month. Is it my mistake at Github or am I committing the "Clinicall" project without knowing?

1 answer

2


Imagine the following scenario:

I have a directory that I call Workspace and within this directory I have all my projects. Examples:

  • Workspace/project1
  • Workspace/project2
  • Workspace/project3

In case I want to send the projecto1 for Github, I must initialize git within this project1 and not within Workspace.

I mean, if I turn the remote git init . inside Workspace every project within Workspace will become part of a single repository.

In order for me to send the three projects separately, that is, as separate repositories, I need to start git within each project. That is, I enter project 1 and start git:

$ cd Workspace/projecto1
$ git init .

And so on and so forth.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.