OK guys i’m currently working on project everyday when i’m done i commit my changes for the project manager to see and aprove pretty normal stuff, today i got a message from him telling me to fix some of my changes but i’m currently away from my notebook i managed to get to a machine but i would like to clone the project i’m working on and pull all those commits that have’t been merged on this new clone so i can fix the issues, reupload the fixes and continue with life is tere a way to achieve this?
If your changes are in a branch on the GitHub repository, you can perform the following steps, assuming that the branch is named
git fetch git checkout -b feature-branch origin/feature-branch
git fetch gets the latest state of everything from the remote repository. The
git checkout command creates a new branch locally named
feature-branch that “tracks” the
feature-branch branch on the remote named
origin. This remote tracking branch has the side effect of:
- Making your local
feature-branchequal to the latest state of
- Setting up your
feature-branchto push to
originwhen you run
git pushand are on
I hope that helps!