I just completed the following:
git add * && git commit -m "message" && git push
However, sometimes I see this issue and am confused as to what it means. Sometimes it's for files I delete and sometimes it's for changes that have not merged correctly.
On branch master
Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
(use "git add/rm <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
deleted: gitup.sh
no changes added to commit (use "git add" and/or "git commit -a")
Quoted from this site: https://www.atlassian.com/git/tutorials/saving-changes/git-add
"The staging area is one of Git's more unique features, and it can take some time to wrap your head around it if you’re coming from an SVN (or even a Mercurial) background. It helps to think of it as a buffer between the working directory and the project history.
Instead of committing all of the changes you've made since the last commit, the stage lets you group related changes into highly focused snapshots before actually committing it to the project history. This means you can make all sorts of edits to unrelated files, then go back and split them up into logical commits by adding related changes to the stage and commit them piece-by-piece. As in any revision control system, it’s important to create atomic commits so that it’s easy to track down bugs and revert changes with minimal impact on the rest of the project."
So when you make a change to a file in git. The first command: git add
git status
I can see this: git add myquote2.html
to add the file to the staging area. Then I run git status
again (you really don't have to do that every time but for the sake of illustration) and I see this: Now you can see myquote2.html is in the "Changes to be committed" section which is the staging area.
Then I run git commit myquote2.html -m 'repeated quote to show how a change moves through the process'
which commits the change to the project history.
image2016-9-30 15:51:20.png
Now you can see the file is committed (um, to master in this case which is generally NOT a good idea ) and the working directory (your local folder) is clean.
Hope this helps a little. We've got some pretty good tutorials for git and Bitbucket:
https://www.atlassian.com/git/tutorials/learn-git-with-bitbucket-cloud
To learn pull requests:
https://www.atlassian.com/git/tutorials/learn-about-code-review-in-bitbucket-cloud
Or how to use SourceTree if you prefer an app to the command line:
https://confluence.atlassian.com/display/BITBUCKET/Tutorial%3A+Learn+SourceTree+with+Bitbucket+Cloud
Happy coding,
Dan
The git book is a great resource for learning the basics. Here's the page that explains what "staging" is: https://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.