I am new to git and hope using it properly.
git init
git add . // added the whole directory
git commit -m "initial stage"
git checkout -b "version1"
git branch
master
* version1
Now i want to add some new files in the directory
cp /path/to/file/admin.php /path/to/git/folder/.
These files should include only on version1 branch but it is also including in the master branch
git add admin.php
git status
On branch version1
Untracked files:
(use "git add <file>..." to include in what will be committed)
admin.php
git checkout master
git status
On branch master
Untracked files:
(use "git add <file>..." to include in what will be committed)
admin.php
The question is how can i add files only on specific branch??
Thanks