git clone git@$GIT_HOST:operation/nagios.gitgit pull -> like: svn up
git add <file> -> If its a new untracked file
git commit -m'message' <file> -> commits the file to your local repo (untracked file)
git push -> pushes local changes to the source git repogit pull
git commit -m'message' -a <file> -> commits the file to your local repo
git push- Get the latest changes
git pull- Make your change
vi somefiles- Make sure your changes are good
git diff- Add to the staging area, and commit
git add somefiles
git commit- Grab possible changes that happened while you were editing, ..* --rebase is your friend, it will avoid to create a merge commit
git pull --rebase- Push your changes
git push origin HEAD:refs/for/master- Edit the files in conflict
vi somefiles- add them, it means "resolve" to git
git add somefiles- Resume the rebase
git rebase --continue- And just to make sure you're up to date, do it again
git pull --rebase- Push your changes
git push origin HEAD:refs/for/mastergit filter-branch --force --index-filter 'git rm --cached --ignore-unmatch [filename]' --prune-empty --tag-name-filter cat -- --all
git push origin --force --all- update local copy in master branch
git pull- Create branch
git checkout -b TICKET- Make changes
- Add Files
git add [files]- Commit
git commit -m “ticket etc”- Push
git push -u origin TICKET- Go to UI and submit pull request
git branch -D bugfixgit push origin --delete <branchName>or
git push origin :<branchName>BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null)
git pull --rebase origin production
git push origin ${BRANCH} --force(this has worked when i need it to, but i haven't tried with branches)
git reset --hard origin/HEAD
git reset —hardfrom the master branch you want to tag
git tag -a -m'message' [tag name]
git push origin [tag name]curl -u user:pass https://[github]/api/v3/orgs/[org]/teams/[team]curl -I -u user:pass https://[github]/api/v3/organizations/655/team/250/members?per_page=100curl -u user:pass --output /tmp/joe "https://[github]/api/v3/organizations/655/team/250/members?page=1&per_page=100"
curl -u user:pass --output /tmp/joe2 "https://[github]/api/v3/organizations/655/team/250/members?page=2&per_page=100"
curl -u user:pass --output /tmp/joe3 "https://[github]/api/v3/organizations/655/team/250/members?page=3&per_page=100"