git/list[1] front-page[2] threads[3] people[4] search[5] about
 

basic question about push

From
RPRuss Paielli <russ.paielli@gmail.com>
Date
Jan 24, 2010, 07:04 UTC
Message-ID
<loom.20100124T074722-510@post.gmane.org>

I am just starting to learn git. I would like to start by using git to work remotely. My work computer and home computer both run Linux. I can log into my work computer from home, but not vice versa. For several years, I have been using ssh (with X forwarding) to login to my work computer from home. I have been basically using my home computer as an X terminal. I would like to start actually working locally on my home computer and use git to stay sync'd with my work computer.

I created a git repository on my work machine, and I cloned it on my home machine. As a test, I edited a file on my home machine and pushed it to my work machine. I guess I don't understand how to use push. I got this:

Counting objects: 5, done.    
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 278 bytes, done.
Total 3 (delta 1), reused 0 (delta 0)        
warning: updating the current branch         
warning: Updating the currently checked out branch may cause confusion,
warning: as the index and work tree do not reflect changes that are in HEAD.
warning: As a result, you may see the changes you just pushed into it       
warning: reverted when you run 'git diff' over there, and you may want      
warning: to run 'git reset --hard' before starting to work to recover.      
warning:                                                                    
warning: You can set 'receive.denyCurrentBranch' configuration variable to  
warning: 'refuse' in the remote repository to forbid pushing into its       
warning: current branch.                                                    
warning: To allow pushing into the current branch, you can set it to 'ignore';
warning: but this is not recommended unless you arranged to update its work   
warning: tree to match what you pushed in some other way.                     
warning:                                                                      
warning: To squelch this message, you can set it to 'warn'.                   
warning:                                                                      
warning: Note that the default will change in a future version of git         
warning: to refuse updating the current branch unless you have the            
warning: configuration variable set to either 'ignore' or 'warn'.             
To ssh://localhost:6666/home/paielli/scala                                    
   7ea65c7..c52864c  master -> master

What does this mean in English? And what is the correct way to transfer my revisions from my home computer to my work computer? Thanks.

Russ P.
Next: Jeff King
Message 1 of 6 in “basic question about push”
  1. Russ PaielliJan 24, 2010
  2. Jeff KingJan 24, 2010
  3. Junio C HamanoJan 24, 2010
  4. Jeff KingJan 25, 2010
  5. Jay SoffianJan 24, 2010
  6. Jeff KingJan 25, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.