git config --global user.name "Robert Harker"
git config --global user.email "harker-git@harker.com"
git config --global core.autocrlf input
git config --global core.safecrlf true
git config --global push.default simple
mkdir [reponame].git
cd [reponame].git
git init
git add . . .
git status
git commit
git remote add origin git@science.cloud5.harker.com:[reponame].git
git config branch.master.remote origin
git config branch.master.merge refs/heads/master
git symbolic-ref -m "linking HEAD to master" HEAD refs/heads/master
git push origin master
git remote show origin
#git branch science
#git push origin master
#git push origin science
#git status
#git remote show origin
# delete a remote branch
git push origin :packstack
git branch -d packstack
# how to ignore an existing file
# add file to .gitignore
# delete file from git repo while keeping locally
git rm --cached [file]
# resyncing a branch
git checkout <name branch>
git pull origin <name branch>
git push origin <name branch>
#This will get the changes that you made online (in your origin) and apply them locally, then add your local changes
git pull --rebase
Now, you can push to remote
# branch / merge
git checkout -b branch_name
git branch -v
git branch --merge | --no-merge
git commit (changes)
git merge branch_name
git branch -d branch_name
git fetch origin
git remote add remote_name git://remote.dom
git fetch remote_name
git push (remote) (branch)
git push origin remote_name
# : -vs- /
local_name:remote_name
remote_name/branch_name
git checkout -b local_name origin/remote_name
git checkout --track remote_name/branch_name
# delete remote branch
git push origin :branch_name
Git TCP port: 9418
# Introduction to GIT on Linux - Install, Create Project, Commit Files
http://www.thegeekstuff.com/2011/08/git-install-configure/
# Raw history
# test my account on github
579 ssh -T git@github.com
594 git show
595 git list
597 git log --pretty=format:"%h %ad | %s%d [%an]" --graph --date=short
602 git update-server-info
780 grep git /etc/passwd
781 sudo chown -R git:git /home/git/.ssh
782 sudo chmod 700 /home/git/.ssh
783 sudo chmod 600 /home/git/.ssh/*
786 ssh git@science
796 ssh git@science
797 git remote rm origin
803 git init
805 git status
851 git init
852 git add *
857 git status
859 git commit -m "Commit of generic minimal Fedora 18 /etc directory"
866 git remote add origin git@science.cloud5.harker.com:fedora18etc.git
867 git config branch.master.remote origin
868 git config branch.master.merge refs/heads/master
874 git push origin master
# verify on git server
876 ssh git@science
877 git push origin master
884 git branch science
886 git branch nova3
887 git push origin master
888 git push origin nova3
889 git push origin science
935 git symbolic-ref -m "linking HEAD to master" HEAD refs/heads/master
.gitignore
945 git rm --cached ld.so.cache
947 git status