Solved

while using git , i want to neglect some files at git to track which prevents me making fast pulls, and forces me to stash, how do i avoid this?

Posted on 2015-01-09
3
177 Views
Last Modified: 2015-02-01
Hi,

i am new to version control system git, and source tree... i want to ask 2 issues,

in git bash, command prompt , any time i try to make a pull it asks for username and password , how do i disable this and avoid asking each time for passwords ?

second question is whenever i make changes to my code and pull changes ,it gets an error sayying that there are changes should be removed or stashed etc.. so these are either configuration files or dll files which i dont want to commit and change the contents but it forces me to stash them before i can make a pull. how do i avoid this?

thank you
0
Comment
Question by:nicedone
  • 2
3 Comments
 
LVL 29

Expert Comment

by:fibo
ID: 40540676
Question 1: is the remote you are pulling from registered in the git profile? check with "git config -l"

Not sure if you are using Git from windows or linux.
From windows, you probably have "git gui" in addition to "git bash" (try typing "git gui" from bash)


Question 2: you need to establish some "clean" reference situation so that all dlls, config, etc are either synced or ignored
use the file .gitignore at the root of your project to define which files or directories should be ignored by the tracking system

(To easily ignore files, I personally use TortoiseGit in addition to git bash/ git gui. Be careful though: Do NOT use Tortoise to push, it badly handles conflicts)
0
 

Author Comment

by:nicedone
ID: 40540719
Hi,

For question  1:   Yes it is registered in the git profile when i hit git config -l ,my profile as well as all the repository information has appeared,

i also typed git gui ,i guess this is an interface for git bash ? but i found soucetree way more easy and more functions available on the interface somehow?

For second question : I make a change to a config file, but i dont want to commit this change ,i dont want to push my config change to other developers but on the side i want to run this file on my own desired settings only so in that case ,ignore would work but then it will affect every one , so the file will be ignored in all system which i would not desire?

how can i resolve this ? thanks again
0
 
LVL 29

Accepted Solution

by:
fibo earned 500 total points
ID: 40543913
question 1: how are you syncing the repositories? thru http: ?
could you place here an edited copy of the output of config -l
(just list the infos for the repository, mail addresse etc, but obfuscate most info)

question 2: before making a pull or a push, you can hide your changes by using "stash"

Another solution would be to "branch" your changes, but this has side effects as well

My 2c on tools:
- I don't know sourcetree, so no comment
- tortoisegit: great to ignore files, and to diff files, with only a right-click. VERY BAD FOR PUSHING since it badly handles conflicts. Do not use Tortoise for pushing changes! Very great to handle any conflicted file (as opposed to a conflicted commit)
- git-gui: great to commit / push files... after their status has been solved with git bash. handling pulls not very evident. The best tool to easily see changes in files
- git bash: great to pull, and to index directories in coherent ways (then commit them with git-gui)
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Article by: gr8gonzo
Git can be a complicated version control system for beginners, but it definitely is one of the best ones out there. Since this article assumes that you're starting at square one, it will skip over things that Git -can- do and will focus on the typic…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now