3 added 1540 characters in body
source | link

Branches in git and svn are fundamentally different things.

In svn a branch (or a tag) is a directory in the repo.

In git a branch (or a tag) is a pointer to a commit.

With svn you can if you wish checkout the root of the repo. This means you have every branch and tag checked out at once. Afaict this is not the normal way to use svn.

A git branch is not a directory, so there is no equivilent to "checking out the root of the repo". There is some support for multiple working trees so I guess you could cobble together a script to checkout every branch at the same time if you really wanted but it would be a rather unusual think to so.

Furthermore with SVN there is exactly one repo. With git every developer has their own repo. This means developers can work offline but it also means that different developers may have a different idea of what is on each branch.

(more By virtue of being directories and by virtue of svn's simple linear history model svn branches have robust histories. If you want to come)know what was on branch x on date y you can easilly ask that question.

Git branches on the other hand don't really have histories. There is the "reflog" but it is intended more as a disaster recovery mechanism than a long term history. In particular the reflog can't be read remotely and is disabled by default for bare repos.

Commits of course have histories but those histories are not sufficient to answer the question of "what was on branch x of repo y on date z".

I cannot find an easy way to see all branches in my local repository using Git.

You can list all local branches by typing "git branch".

You can list all branches both local and remote by using "git branch -a"

Also I would like to know how to handle a process where I need to work on two branches at the same time in case, for example, I need to make an hotfix on master but keep the content of another branch too.

A couple of options.

You can commit your changes on the "other branch", switch to master do your work there and then switch back.

You can also create an extra working tree. Google "git-worktree" for the details on the syntax.

What is a recommend name conventions to make the folders which include the branch cloned from the repo in Git, example myproject-branchname?

I don't think there is an established convention. Having multiple working trees checked out at once is the exception not the rule.

Branches in git and svn are fundamentally different things.

In svn a branch (or a tag) is a directory in the repo.

In git a branch (or a tag) is a pointer to a commit.

With svn you can if you wish checkout the root of the repo. This means you have every branch and tag checked out at once. Afaict this is not the normal way to use svn.

A git branch is not a directory, so there is no equivilent to "checking out the root of the repo". There is some support for multiple working trees so I guess you could cobble together a script to checkout every branch at the same time if you really wanted but it would be a rather unusual think to so.

Furthermore with SVN there is exactly one repo. With git every developer has their own repo. This means developers can work offline but it also means that different developers may have a different idea of what is on each branch.

(more to come)

Branches in git and svn are fundamentally different things.

In svn a branch (or a tag) is a directory in the repo.

In git a branch (or a tag) is a pointer to a commit.

With svn you can if you wish checkout the root of the repo. This means you have every branch and tag checked out at once. Afaict this is not the normal way to use svn.

A git branch is not a directory, so there is no equivilent to "checking out the root of the repo". There is some support for multiple working trees so I guess you could cobble together a script to checkout every branch at the same time if you really wanted but it would be a rather unusual think to so.

Furthermore with SVN there is exactly one repo. With git every developer has their own repo. This means developers can work offline but it also means that different developers may have a different idea of what is on each branch.

By virtue of being directories and by virtue of svn's simple linear history model svn branches have robust histories. If you want to know what was on branch x on date y you can easilly ask that question.

Git branches on the other hand don't really have histories. There is the "reflog" but it is intended more as a disaster recovery mechanism than a long term history. In particular the reflog can't be read remotely and is disabled by default for bare repos.

Commits of course have histories but those histories are not sufficient to answer the question of "what was on branch x of repo y on date z".

I cannot find an easy way to see all branches in my local repository using Git.

You can list all local branches by typing "git branch".

You can list all branches both local and remote by using "git branch -a"

Also I would like to know how to handle a process where I need to work on two branches at the same time in case, for example, I need to make an hotfix on master but keep the content of another branch too.

A couple of options.

You can commit your changes on the "other branch", switch to master do your work there and then switch back.

You can also create an extra working tree. Google "git-worktree" for the details on the syntax.

What is a recommend name conventions to make the folders which include the branch cloned from the repo in Git, example myproject-branchname?

I don't think there is an established convention. Having multiple working trees checked out at once is the exception not the rule.

2 added 731 characters in body
source | link

Branches in git and svn are fundamentally different things.

In svn a branch (or a tag) is a directory in the repo.

In git a branch (or a tag) is a pointer to a commit.

With svn you can if you wish checkout the root of the repo. This means you have every branch and tag checked out at once. Afaict this is not the normal way to use svn.

A git branch is not a directory, so there is no equivilent to "checking out the root of the repo". There is some support for multiple working trees so I guess you could cobble together a script to checkout every branch at the same time if you really wanted but it would be a rather unusual think to so.

Furthermore with SVN there is exactly one repo. With git every developer has their own repo. This means developers can work offline but it also means that different developers may have a different idea of what is on each branch.

(more to come)

Branches in git and svn are fundamentally different things.

In svn a branch is a directory in the repo.

In git a branch is a pointer to a commit.

(more to come)

Branches in git and svn are fundamentally different things.

In svn a branch (or a tag) is a directory in the repo.

In git a branch (or a tag) is a pointer to a commit.

With svn you can if you wish checkout the root of the repo. This means you have every branch and tag checked out at once. Afaict this is not the normal way to use svn.

A git branch is not a directory, so there is no equivilent to "checking out the root of the repo". There is some support for multiple working trees so I guess you could cobble together a script to checkout every branch at the same time if you really wanted but it would be a rather unusual think to so.

Furthermore with SVN there is exactly one repo. With git every developer has their own repo. This means developers can work offline but it also means that different developers may have a different idea of what is on each branch.

(more to come)

1
source | link

Branches in git and svn are fundamentally different things.

In svn a branch is a directory in the repo.

In git a branch is a pointer to a commit.

(more to come)