Go to the directory you want to initiate Git and then follow the commands:
- Initiate the git:
git init
- Remove Git if you have initiated in a wrong place ( Be aware if there is another git in the subdirectory):
rm -rf .git
- To add all the files(including subdirectory) to the staging step:
git add .
Or,
git add -A
- Git branch –
a. Create a new one from the current branch and Checkout to the new branch:git checkout -b newBranch
b. Delete a branch branch:git branch -d branchName
- Merge master to development branch –
1. //pull the latest changes of current development branch if any
git pull (current development branch)
2. //switch to master branch
git checkout master
3. //pull all the changes if any
git pull
4. //Now merge development into master
git merge develop
5. //push the master branch
git push origin master