version control - Committing Code in Git where branch is ahead of origin by one commit -


i have scenario working on qa environment. made changes source code using vi editor. want commit above changes branch , possibly push branch origin. @ first want commit changes.

here git status shows me:

git screenshot read using git -m "msg" .. can commit changes. not sure , other thing seeing message your branch ahead of 'origin/master' 1 commit not sure how proceed further. quiet new git , don't want break things. in case want me write command , paste output please let me know.

three stage thinking

in git, work source in 3 stages:

edit - add - commit

first, edit files. make changes files, output of git status change reflect modifications you've made. can view changes you've made far git diff.

next, add, or stage, work. stage of changes particular file git add <file>. again, output of git status change reflect you've staged. can view changes have staged git diff --cached.

last, commit changes. when run git commit, whatever files have staged bundled commit. commit includes snapshot of repository, commit message, time, , author. can view commits git log. git log -p in particular show changes made in each commit.

pushing

before try pushing code, recommend talking co-workers contribution guidelines repository. example, may want push branch or go through code review process.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -