

Warning: fault is unset its implicit value is changing in $ git commit -m "branch new head version" Nothing to commit, working directory clean Writing objects: 100% (3/3), 214 bytes | 0 bytes/s, done.īranch master set up to track remote branch master from origin. $ git push -u origin -all # pushes up the repo and its refs for the first time head versionĢ files changed, 0 insertions(+), 0 deletions(-) Nothing added to commit but untracked files present (use "git add" to track) Initialized empty Git repository in e:/test/.git/ Run 'git help ' to display help for specific commands. Run 'git help git' to display the help index. Remote screenshot, only see the default master branch, not the new branchĬommand Welcome to Git (version 1.9.5-preview20141217) gitBranch, created locally newBranch commitafter pushWrong report and not seen remotely newBranch. If we do git branch -vv again, we can see that jsChanges is now mapped to origin jsChanges.I don’t know about git branch, but I’m testing it today. We can do -set-upstream or we can do -u, and then origin jsChanges. We have to push while setting the upstream to the origin jsChanges, just like this is origin master. When we do, we get a fatal error, because if we do git branch -vv, we don't have jsChanges linked to any remote branch. If we do a git log oneline, then we have "Adds Hello World" on the jsChanges branch, which has diverged from the master branch. We'll commit that and we'll say, "Adds Hello World."

Then, let's save that and do a git status. We'll make a function called helloWorld again, and we can say alert i. Master is linked to a remote, but jsChanges is just a local branch for now.

If we do git branch -vv, for verbose mode, then we can see the current commit that we're on for each branch, and we can see the remote that we're on for each branch. We can also do git branch to see all of our branches. If we do a git status, we can see that we're on the branch jsChanges. That's what we'll do to make a new branch. We can do git branch and then our branch name like jsChanges or we can do git checkout -b jsChanges. Instructor: We can create a new branch in two different ways.
