Skip to content

Instantly share code, notes, and snippets.

Created January 26, 2010 01:04
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save anonymous/286435 to your computer and use it in GitHub Desktop.
bjc@laptop:~$ mkdir temp
bjc@laptop:~$ cd temp
bjc@laptop:~/temp$ git init
Initialized empty Git repository in /home/bjc/temp/.git/
bjc@laptop:~/temp$ git remote add origin git@secure.dfk-systems.com:DFK-development.git
bjc@laptop:~/temp$ echo "DFK-development" >> DFK
bjc@laptop:~/temp$ git add DFK
bjc@laptop:~/temp$ git commit -a -m "Initial files"
[master (root-commit) 21d4ce4] Initial files
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 DFK
bjc@laptop:~/temp$ git push origin master:/refs/heads/master
Initialized empty Git repository in ./
Counting objects: 3, done.
Writing objects: 100% (3/3), 238 bytes, done.
Total 3 (delta 0), reused 0 (delta 0)
To git@secure.dfk-systems.com:DFK-development.git
* [new branch] master -> /refs/heads/master
bjc@laptop:~/temp$ git clone git://github.com/management.git management
Initialized empty Git repository in /home/bjc/temp/management/.git/
remote: Counting objects: 73762, done.
remote: Compressing objects: 100% (15394/15394), done.
remote: Total 73762 (delta 58778), reused 72066 (delta 57380)
Receiving objects: 100% (73762/73762), 10.62 MiB | 120 KiB/s, done.
Resolving deltas: 100% (58778/58778), done.
bjc@burnleyjc-laptop:~/temp$ ls -a
. .. management DFK .git
So, the basics are setup and I have a remote repo on my server
bjc@laptop:~/temp$ cd management/
bjc@laptop:~/temp/management$ git branch
* master
bjc@laptop:~/temp/management$ git pull
Already up-to-date.
bjc@laptop:~/temp/management$ git branch -a
master
remotes/origin/1.3
bjc@laptop:~/temp/management$ git checkout --track -b 1.3 master
Branch 1.3 set up to track local branch master.
Switched to a new branch '1.3'
bjc@laptop:~/temp/management$ echo "My File" >> myfile
bjc@laptop:~/temp/cakephp1x$ git status
# On branch 1.3
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# myfile
nothing added to commit but untracked files present (use "git add" to track)
bjc@laptop:~/temp/cakephp1x$ git add myfile
bjc@laptop:~/temp/cakephp1x$ git commit -a -m "Myfile added"
[1.3 6937301] Myfile added
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 myfile
I want to PUSH these changes to my server. Can this be done?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment