GIT Normal commands ======================================================
git clone https://username:password@yourrepo.bitbucket.com
git status
git pull
git status
git add –all
git commit -m “comments”
git push -u origin master
Branches ======================================================
https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging
https://www.atlassian.com/git/tutorials/syncing/git-push
https://stackoverflow.com/questions/16408300/what-are-the-differences-between-local-branch-local-tracking-branch-remote-bra
— to view what is your remote
git remote -v
git branch -r — view remote branches
git branch -vv — view local branches
— switch to work on develop branch
git checkout -b develop — if you want to work on a new branch this should work for you:
git pull origin develop
git status
git add –all
git commit -m “comments”
git push -u origin develop
reset =========================================
git reset — give up all local changes
git reset –hard origin/develop — give up all local changes hard to a branch
Not track a file =========================================
Try using this command:
git update-index –assume-unchanged FILENAME_TO_IGNORE
To reverse it (if you ever want to commit changes to it), use:
git update-index –no-assume-unchanged
Here’s how to list ‘assume unchanged’ files under current directory:
git ls-files -v | grep -E “^[a-z]”
As the -v option will use lowercase letters for ‘assume unchanged’ files.
Conflict resolve ========================================================
if conflict, then edit conflicted file content, run git add on each file to mark it as resolved.
Staging the file marks it as resolved in Git.