Hi Falcon team, I define this simple git flow to help you guys easily when working with git
git fetch upstream
git checkout -b feature-name upstream/dev
git add .
git add file_url
git commit -m "[BOOST-ID]:Task ..."
git push origin feature-name
First, let's see a list of the repositories (remotes) whose branches you track:
git remote -v
First, you'll want to know what branches are available in your working directory:
git branch
Now, you can easily switch between branches with git checkout:
git checkout branch-name
git status
git fetch upstream
git rebase upstream/dev
The following command will undo your most recent commit and put those changes back into staging, so you don't lose any work:
git reset --hard HEAD~1
Sometimes you need to stash your changes so you can be on a clean branch or maybe because you want to go back and try something before you make a commit with these changes. Here's how you do a stash:
git stash
Apply stash
git stash apply